-1
弹出显示并消失时showpopup返回它不消失但没有值如果没有返回它显示并消失,但一个我再次点击它显示值,但很快它消失当OnClientClick =“ShowPopup()
。<ItemTemplate>
<asp:Button ID="btndetails" runat="server"
CommandName="ShowPopup" OnClientClick="ShowPopup();return false ;"
Text="select issue" />
</ItemTemplate>
代码背后
protected void GridView1_RowCommand(object sender,GridViewCommandEventArgs e)
{
if (e.CommandName == "ShowPopup")
{
Button btndetails = (Button)e.CommandSource;
GridViewRow gvrow = (GridViewRow)btndetails.NamingContainer;
// lblID.Text = HttpUtility.HtmlDecode(gvrow.Cells[3].Text);
// lblID.Text = GridView1.DataKeys[gvrow.RowIndex].Value.ToString();
lblID.Text = gvrow.Cells[2].Text;
// lblContactName.Text = HttpUtility.HtmlDecode(gvrow.Cells[3].Text);
//txtAddress.Text = gvrow.Cells[5].Text;
// txtCity.Text = HttpUtility.HtmlDecode(gvrow.Cells[4].Text);
}