我在超级连接里面传了个参数
例如:
<a href='xxx.aspx?id=恐怖小说>恐怖小说</a>
怎么在接收这个参数的时候只有 恐怖小 后面哪个字就没有了,怎么回事.

解决方案 »

  1.   

    <%@ Page language="c#" AutoEventWireup="false" debug="true"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <html>
      <head>
        <title>URL 传中文参数</title>
        <meta name="CODE_LANGUAGE" Content="C#">
        <meta name=vs_defaultClientScript content="JavaScript">
        <meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
        <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function SetUrl()
    {
    window.location= "URL 传中文参数.aspx?id=" + escape("恐怖小说");
    }
    //-->
    </SCRIPT>
    <script runat="server" language="c#">
    private void Page_Load(object sender, System.EventArgs e)
    {
    if(Request.QueryString["id"] != null )
    {
    Response.Write("传过来的参数是:" + Request.QueryString["id"]);
    }
    }override protected void OnInit(EventArgs e)
    {
    InitializeComponent();
    base.OnInit(e);
    }private void InitializeComponent()
    {    
    this.Load += new System.EventHandler(this.Page_Load);
    }</script>
      </head>
      <body>

        <form id="Form1" method="post" runat="server">
    <a href='JavaScript:SetUrl()'>恐怖小说</a>
        </form>

      </body>
    </html>