0

I created method which is converting non english word to english but i would like to do same on url requests.

For Example: If user can write % on browser's address bar, i would like to delete it automatically and than show new url. I think i need to define special characters and i already have and than what we need to do?

Any suggestions?

UPDATED Question

Do you have any idea how can we do in routeurl?
It's important if user writes custom words in browser's address bar. Can we do this in Global.asax or Page Load? or maybe need to add an override metod?

Cagatay
  • 333
  • 1
  • 3
  • 13
  • Assuming that you are not talking about browser's address bar, you can use something like http://stackoverflow.com/questions/3053523/disallow-typing-of-few-of-characters-e-g-in-all-input-textboxes-using-j. For WebForms solution take a look at http://www.asp.net/web-forms/overview/ajax-control-toolkit/filteredtextbox/allowing-only-certain-characters-in-a-text-box-cs. If you are talking about actual postbacks, then take a look into http://stackoverflow.com/questions/2276608/javascript-event-on-page-postback – Eugene Podskal Mar 05 '16 at 11:03
  • I already have filtered textbox. I have special filter method. But if user tries custom words in browser's address bar than i would like to change that url too. – Cagatay Mar 05 '16 at 11:14
  • Well, I don't claim a deep knowledge of Web Programming and Javascript, but address bar is probably off limits for Javascript. Because Javascript is sand-boxed in the browser, and sand-boxing means that page's javascript can access basically nothing outside of the page it is from. – Eugene Podskal Mar 05 '16 at 13:40

0 Answers0