You must Sign In to post a response.
  • Category: JavaScript

    Hide Querystring on page navigation

    Hide querystring parameters on page redirection from clientside to serverside.

    Below is the code used in ClientSide:

    var settings = 'scrollbars=1,toolbar=0,height=' + height;
    settings = settings + ',width=' + width;
    settings = settings + ',top=' + top;
    settings = settings + ',left=' + left;
    var url = 'VAEditCptCode.aspx?caseid=' + caseidtmp + '';
    window.open(url, 'new', settings);
  • #748453
    Hi samaria,

    You can do it by Encrypt the Querystring values and while fetching it from other page you can decry-pt while displaying in other page.

    Refer below link this will help you..
    http://aspsnippets.com/Articles/Encrypt-and-Decrypt-QueryString-Parameter-Values-in-ASPNet-using-C-and-VBNet.aspx

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #748461
    I donot want to use encrypt decrypt.
    Any other solution.
    How can i use url rewrite

  • #748469
    you can use the concept of url rewriting in the global.asax file.
    Miss. Jain
    Microsoft Certified Technology Specialist in .Net

  • #748526
    Hi,

    You can use url rewriting for this. just download rewriter from nuget package and in the web.config file, write the below code-

    <rewrite>
    <rules>
    <rule name="301 redirect from non-www to www for abc" enabled="true" stopProcessing="true">
    <match url="(.*)"/>
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
    <add input="{HTTP_HOST}" pattern="^www\.abc\.com$" negate="true"/>
    </conditions>
    <action type="Redirect" url="www.abc.com/{R:1}"/>
    </rule>
    </rewrite>

    Thanks,
    Ashutosh Jha
    http://tricksroad.com


  • Sign In to post your comments