标签:
/// <summary> /// 搜索内容 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSearch_Click(object sender, EventArgs e) { string key = txtSearch.Text.Trim(); string action = this.radTitle.Checked ? "byTitle" : "byContent"; Response.Redirect("~/NewsSearch.aspx?key=" + Server.UrlEncode(key) + "&action=" + action + ""); }
ASP.NET - 对URL传递的值进行编码Server.UrlEncode()
标签:
原文地址:http://www.cnblogs.com/KTblog/p/4632577.html