Hello all,
i have implemented routecollection in asp.net using global.asax.
the problem is that if my current url is localhost:0000/task and i click on anchor tag
<a href="CreateTask" class='navlink'>Create Task</a>
then it is working fine..but if url can be like localhost:0000/task/23 when i am adding querystring in global.asax. In my case, it will take 23 as taskid and will show related records to id 23. But in this case it is still on the same page.
Here my url is localhost:0000/task/23
Suppose I want to navigate to another page named as team then after clicking on the same the link in address bar should be localhost:0000/team
but in my case it displays link in address bar : localhost:0000/task/team
and it doesnt redirect anywhere because it is creating incorrect link as above
So my question is how can i redirect it to :localhost:0000/team
The MapRoute is like
routecollection.MapPageRoute("CreateTask", "CreateTask", "~/View/CreateTask.aspx");
routecollection.MapPageRoute("TaskProfile", "TaskProfile/{taskid}", "~/View/TaskProfile.aspx");
how to solve this issue..