Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Developers,

I am working on the page in MVC 5 where page is submitting the data.
I have a url with querystring on my page.

My scenario is when submitting data is successful then redirect to another page
and when error occurs then remain on same page with previously filled data and show the error.

I have achieved the first one and also half of second scenario but when i post data and error
occurs - my url losts the querystring.


eg. My actual url is -> www.example.com/register.htm?id=1&val=abc&ref=xyz

when i post data and error occurs it becomes - www.example.com/register.htm

I want to keep the url same when error occurs so user can reload the page.

Please help me guys.

Thanks in advance.
Posted
Comments
arvind mepani 10-Jul-14 10:10am    
Have you tried form method POST instead of GET because query string value is displayed if you have used GET method otherwise not
Member 10359492 11-Jul-14 2:27am    
No its not possible, GET is not working here. Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900