troubleshooting Question

asp.net routing without mvc, ASP.net 4.0

Avatar of TrialUser
TrialUserFlag for Afghanistan asked on
.NET ProgrammingASP.NETVisual Basic.NET
1 Comment1 Solution559 ViewsLast Modified:
I am trying to implement asp.net routing without MVC. With the code I have so far I am able to route and pass a parameter. My url looks like:
http://localhost:47261/Category/30

Now, what I need to be able to achieve is somethng like  :
http://localhost:47261/SchoolSuply/30

In other words "Category" should not be hard coded and I should be able to change it to anything and still the website is not broken. How can I achieve this? I am working with VB.net, ASP.net 4.0

The code I have so far is :
Global.asax.vb:

 routes.MapPageRoute("Categories", "Category/{CategoryName}", "~/Category.aspx").

In the default page I do ;
Response.RedirectToRoute("Categories", New With {.CategoryName = txtCategory.Text.Trim})
Please help. Thanks
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros