亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

關于Server.UrlEncode()編碼的問題?求解

關于Server.UrlEncode()編碼的問題?求解

嗶嗶one 2018-11-26 14:12:05
出現了一個很奇怪的問題,不知道是哪里設置錯了,還是怎么回事,我使用Server.UrlEncode() 編碼一個字符串,出來的值竟然沒有進行編碼,查原因,那就叫個糾結啊,使用其他方法可以解決,但是小弟就像弄明白倒是是怎么回事,什么原因,求各位大俠,高手給予指導,謝謝,大家一起探討一下,代碼如下:編碼前,前提是在gridview中使用的哈。protected void Grid_RowDataBound(object sender, GridViewRowEventArgs e)    {        if (e.Row.RowType == DataControlRowType.DataRow)        {            e.Row.Attributes["style"] = "Cursor:hand";            e.Row.Attributes.Add("onmouseover", "c=style.backgroundColor;style.backgroundColor='#add8e6'");            e.Row.Attributes.Add("onmouseout", "style.backgroundColor=c");            string sp_code = Grid.DataKeys[e.Row.RowIndex].Value.ToString();            string cal_url = String.Format("SupplierEdit.aspx?spCode={0}", Server.UrlEncode(sp_code));            e.Row.Attributes.Add("ondblclick", String.Format("document.location.href='{0}'", cal_url));        }    } 編碼后網頁地址參數:Company/SupplierEdit.aspx?spCode=SP00001然后我就郁悶了,求給位給個解釋,分數就給少了哈,高手不會太在意豆豆的。謝啦哈。
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 489 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號