【问题标题】:Request.QueryString in asp.netasp.net 中的 Request.QueryString
【发布时间】:2011-07-24 15:56:28
【问题描述】:

我的代码运行良好,但我想以加密形式发送“项目”和“模式”。asp 中的任何内置方法?如果不是,请建议替代解决方案。

string url = "QueryStringRecipient.aspx?";
url += "Item=" + lstItems.SelectedItem.Text + "&";
url += "Mode=" + chkDetails.Checked.ToString();
Response.Redirect(url);

【问题讨论】:

    标签: c# asp.net request.querystring


    【解决方案1】:
    【解决方案2】:

    加密还是编码?

    编码字符串有HttpServerUtility.UrlEncode

    public string UrlEncode(
        string s
    )
    

    参数

    s
        Type: System.String
        The text to URL-encode.
    

    返回值

    Type: System.String
    The URL-encoded text.
    

    解码HttpServerUtility.UrlDecode

    public static string UrlDecode(
        string str
    )
    

    参数

    str
        Type: System.String
        The string to decode.
    

    返回值

    Type: System.String
    A decoded string.
    

    【讨论】:

    • 如何描述和捕捉真实价值?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-10-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多