Search code examples
url-rewritingdotnetnukeurldecodedotnetnuke-9

Is there a DNN URL decode method as it is changing a URL Encode


We are using Server.URLEncode to change an SKU with a forward slash from BDF5555/45 to BD5555%2F45 in our Href on a button.

enter image description here

When a person clicks on the button the page navigates to another module which has Request.QueryString but DNN is changing the URL.

How can I get the variable decodeprodCode to include the &45 as BDF5555/45? Perhaps DNN is rewriting the URL?

enter image description here


Solution

  • There is a NavigateURL class in DotNetNuke.Common.Globals that will generate a correct url based on a TabID and a lot of overloads.

    DotNetNuke.Common.Globals.NavigateURL(TabId)
    

    You can also use querystring parameters

    DotNetNuke.Common.Globals.NavigateURL(TabId, ControlKey,"key=value"))