URL Routing in asp.net

Posted by kbm5evm-16703 under ASP.NET on 1/16/2013 | Points: 10 | Views : 1036 | Status : [Member] | Replies : 3
Hi...

my site url would be like this www.test.com. if somebody gave like www.test.com/questions. it should be redirected to some survey which contains questions. how can i impliment this. i need to get string from that url like questions.
i tried using routing but it doesn't worked out.


RouteTable.Routes.MapPageRoute("publish", "/{publish}", "~/Index.aspx" );

Thanks in advance..




Responses

Posted by: Ranjeet_8 on: 1/16/2013 [Member] [MVP] Gold | Points: 25

Up
0
Down
go through this url to download sample project
www.codedigest.com/Articles/ArticleFiles/ZIPS/294.zip

Please Mark As Answer if this helps you

.

kbm5evm-16703, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Saratvaddilli on: 1/16/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi ,

once go through this sample project

http://www.codeproject.com/Articles/77199/URL-Routing-with-ASP-NET-4-0

Thanks and Regards
V.SaratChand
Show difficulties that how difficult you are

kbm5evm-16703, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: kbm5evm-16703 on: 1/16/2013 [Member] Starter | Points: 25

Up
0
Down
Thanks for ur reply...
my project does not contain folder. by giving url like this www.test.com/questions it should be redirected to questions page. if the url is like this www.test.com/doctor it should be redirected to doctors page... based on the last string it should be redirected. in this way users can search whatever word they want. help me in this aspect..

kbm5evm-16703, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response