日期:2014-05-17 浏览次数:20422 次
<asp:TemplateField HeaderText="用户名"> <ItemTemplate> <a href="javascript:showdetail('<%# Server.UrlEncode( Eval("userName").ToString()) %>')"> <%#Eval("userName")%> </a> </ItemTemplate>
function showdetail(userName) { var s = new Object(); s.name = "aaa "; var result = window.showModalDialog('userDetail.aspx?userName=' + userName, '', 'dialogWidth=835px;dialogHeight=400px;status=no'); if (result.type == " ")//传递回的type为空的时候才刷新页面。 { //alert("刷新 "); location.reload(); } }
string userName00 = Request.QueryString["userName"].ToString(); //获取用户id userName = Server.UrlDecode(userName00); Label1.Text = userName;