Deliver Awesome UI with the most complete toolboxes for .NET, Web and Mobile development
Automate UI, load and performance testing for web, desktop and mobile
A complete cloud platform for an app or your entire digital business
Detect and predict anomalies by automating machine learning to achieve higher asset uptime and maximized yield
Automate decision processes with a no-code business rules engine
Optimize data integration with high-performance connectivity
Connect to any cloud or on-premises data source using a standard interface
Build engaging multi-channel web and digital experiences with intuitive web content management
Personalize and optimize the customer experience across digital touchpoints
Build, protect and deploy apps across any platform and mobile device
Rapidly develop, manage and deploy business apps, delivered as SaaS in the cloud
I'd like to develop an MVC widget with an Index method that accepts a string that identifies the particular detail record and then displays that record. I'd like the url to simply be the url of the page the widget resides on, and that id. (for example, say we have an 'agents' page and an ID of 'd039f') the url would look like /agents/d039f
However, the index method won't accept a conditional string, only a conditional integer value. I know I could get what I want if I create another action in my controller, such as 'details', but then my url gets longer and goes to /agents/details/d039f
Is there a way to get the shorter url, without having to create another action that can accept the string identifier?
You can use HandleUnknownAction method in your controller and resolve view properly
//actionname is id and you have agent with specific id)
Unfortunately this is the only widget on the page, and at least when using the Sitefinity Project Manager or Visual Studio to view the site, entering the string does call HandleUnknownAction, but it never renders the view that I call. I've tried View("Index").ExecuteResult(), this.Index().ExecuteResult(), this.ActionInvoker(), etc..
If I add another widget to the page, it works, though.