Click here to Skip to main content
16,018,442 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to use Routing in pages for my website. When user click category name then i can passed catid into ArticlesList.aspx page...if user clicks particular Article then i need to pass article id into articledetails.aspx page...
when i am trying to click particular article its not working...
when articlelist page is loaded if catid is 1 then url like this http:local/mysite/Articlelist/1

when i am click one article then url like http:local/mysite/Articlelist/Articleinfo/10 its a problem....if i am manualy given a url like http:local/mysite/Articleinfo/10 - its working...How to solve this problem...Give me a suggestions plz?


global.asax file:

void RegisterRoutes(RouteCollection routes)
{
routes.MapPageRoute("", "Articlelist/{catid}", "~/ArticlesList.aspx");
routes.MapPageRoute("", "Articleinfo/{artid}", "~/articledetails.aspx");
}
Posted

1 solution

I can add a href like this
<a href="../Articleinfo/<%# Eval(" artcile_id=") %>"></a>
this can be solved my problem...
 
Share this answer
 

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