Can we map multiple URL’s to the same action?

Yes, you can, you just need to make two entries with different key names and specify the same controller and action.

Tagged . Bookmark the permalink.

2 Responses to Can we map multiple URL’s to the same action?

  1. Anchal mahajan says:

    Can we map multiple URL’s to the same action?
    can you please clear the above sentence with an example …

    Thank you

    • Lets say you have a hyperlink in your View that goes like this
      NavigateUrl=’< %# returnURL("http://localhost:3931/Home/getData") %>‘
      or
      NavigateUrl=’< %# returnURL("http://localhost:3931/Home/Data") %>‘
      function string returnURL(string URL)
      {
      if(URL ==’http://localhost:3931/Users/Data’)
      {
      return “http://localhost:3931/Home/getData”;
      }
      else
      {
      return URL;
      }
      }

Leave a Reply

Your email address will not be published. Required fields are marked *