Click here to Skip to main content
15,884,537 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using global file to rewrite URL, rewriting works fine for other url just one rule is not working which makes all ajax/button clicks stop. All my button clicks works fine when i use:
C#
routes.MapPageRoute("BusinessDetails", "bd/{PageUrl}", "~/business-details.aspx")

but i dont want this type of url:
JavaScript
'www.mywebsite/com/bd/business'

i need this
'www.mywebsite.com/business'
for this am using
C#
routes.MapPageRoute("BusinessDetails", "{PageUrl}", "~/business-details.aspx")

but this stops all button clicks though i get the needed url and site works just stops all button clicks/update pannel/validation.

I need this url to work with all button clicks
www.mywebsite/com/business or
XML
www.mywebsite.com/business

XML
www.mywebsite.com/business/
like this works in indiamart

What I have tried:

Tried using 'routes.Ignore("{webresource}.axd/{*pathInfo}")' for button click as was getting error in console 'Unexpected token <' in webresource.axd
Also tried
C#
routes.MapPageRoute("BusinessDetails1", "{PageUrl}/{categoryName}", "~/business-details.aspx", false, New RouteValueDictionary(New With {.categoryName = "home"}))

And also when i click on button it says in console 'Page_ClientValidate is not defined'
Posted

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