This is a migrated thread and some comments may be shown as answers.

[Solved] Route Conflict - Grid is using ajax request url: /contact?action={MyActionName}&controller={MyControllerName}

2 Answers 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Anna San Luis
Top achievements
Rank 1
Anna San Luis asked on 29 Oct 2011, 07:37 PM
I have a route in my web application to a web forms page that maps to the url '/contact'.

When I drop the MVC Grid in my app it uses this url format when doing ajax requests:

http://{domain}/contact?action={MyActionName}&controller={MyControllerName}

Because I have a route for '/contact' else ware in my app these ajax requests are retrieving the html for that page instead of the expected json for the grid.

The demos don't seem to behave this way in terms of what url they use for retrieving their json data from the application. Instead of using the 'contact' url segment and querystring parameters for action and controller they seem to produce the more expected:

http://{domain}/{application name probably}/{ControllerName/{ActionName}


My question is: How can I get the MVC Grid to NOT use the '/contact' url segment with controller and action as querystring parameter as it's route configuration, generating full querystring parameterless urls with the controller and action name in the path, thus avoiding my routing conflict.

2 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 31 Oct 2011, 09:38 AM
Hi Anna San Luis,

Unfortunately I'm not sure what is your exact scenario judging for the provided information. Therefore, could you please send us a small sample project which demonstrate the issue you are facing. 

All the best,
Rosen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Nanda
Top achievements
Rank 1
answered on 05 Dec 2012, 01:16 PM
hi,
any body found solution for this. I am also getting the same kind of problem. When grid makes ajax request to get data, URL is not getting constructed in a proper way. Instead of something like this Grid/_customBinding/parm1/Param2/ it is constructing url with query strings
like /Account/Login?action="_customBinding"&Controller="Grid"&param1="ff".

The same Anna San Luis said.
Tags
Grid
Asked by
Anna San Luis
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Nanda
Top achievements
Rank 1
Share this question
or