Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi Dear friends I am new in programming and I am facing some issues in url routing...
actually I have done url rewriting and url routing in my web application and every think is working fine but a problem which i am facing is that...
C#
routes.MapPageRoute("companyPanel", "company", "~/companyPanel.aspx");
routes.MapPageRoute("CustomerDetails", "Details/{propertyid}", "~/AdDetails.aspx");

in above syntax when i open company page its working fine and url is looking like this "http://localhost:10852/Details[^]/33" and when i go to detail page i am also passing value in url like this "http://localhost:10852/Details/33[^]"
and when again i go to detail page than url looks like thisn "http://localhost:10852/Details/company[^]" but it should be like this"http://localhost:10852/company[^]"...
it removed value but previous page is still present in url kindly tell me how can i remove previous name....kindly help me.... :(
Posted

1 solution

Please refer to: https://msdn.microsoft.com/en-us/library/cc668177.aspx[^]

how to add routes for Web Form Application
 
Share this answer
 
Comments
Member 10325769 14-Sep-15 1:57am    
thanks sir for this help....i have visited this link and tried but my problem is still unsolved....actually sir "details/{proeprtyid}" in this syntax property id is value which i m passing to another page in url but when i go to detail page and than tried to ga back to any other page than only "propertyid" is reomove and "details" is not removed from url and i want to remove both "details/{proeprtyid}" for example i want to go back to company page than url will be looked like this "localhost/10852/detail/company" but it should be like this "localhost/10852/company" . thanks
Mostafa Asaduzzaman 14-Sep-15 7:02am    
on top of route configuration you need to write the rules for getting the custom url

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