this.ModalPopupExtenderQ.show();
<asp:ListView runat="server" ID="ListViewQualification" InsertItemPosition="LastItem" onitemcommand="ListView1_ItemCommand"> <layouttemplate> <asp:Panel id="itemPlaceholder" runat="server"/> </layouttemplate> <itemtemplate> <asp:Panel runat="server" ID="actual" class="panel"> <asp:LinkButton ID="imgbtn" runat="server" CssClass="panel" CommandName="Edit">Edit <%--<asp:LinkButton ID="lnkEdit" runat="server" Text="Edit">--%> <asp:Label runat="server" ID="lblId" Visible="false"><%#Eval("InstituteID")%> <asp:Label runat="server" ID="lblStartYr"><%#Eval("YearStart")%> <asp:Label runat="server" ID="lblEndYr"><%#Eval("YearEnd")%> <asp:HyperLink runat="server" ID="hyphidden" Visible="false" > <asp:ModalPopupExtender runat="server" ID="ModalPopupExtenderQ" PopupControlID="EditPanel" TargetControlID="hyphidden" CancelControlID="lnkCancel" > <asp:Panel runat="server" ID="EditPanel" > <asp:TextBox runat="server" ID="InstituteID" Text="institute Name" Visible="false" > <asp:TextBox runat="server" ID="YearStart" Text="Year Started"> <asp:TextBox runat="server" ID="YearEnd" Text="Year Ended"> <asp:LinkButton ID="lnkUpdate" runat="server" CommandName="Update" CssClass="btn" Text="Update" > <asp:LinkButton ID="lnkCancel" runat="server" CssClass="btn" Text="Cancel"> </itemtemplate> <edititemtemplate> </edititemtemplate> <insertitemtemplate> <asp:Panel ID="PanelInset" runat="server"> <asp:TextBox runat="server" ID="InstituteID" Text="institute Name" > <asp:TextBox runat="server" ID="YearStart" Text="Year Started"> <asp:TextBox runat="server" ID="YearEnd" Text="Year Ended"> <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" /> </insertitemtemplate>
protected void ListView1_ItemCommand(object sender, ListViewCommandEventArgs e) { if (e.CommandName == "Insert") { TextBox InstituteID = (TextBox)e.Item.FindControl("txtFname"); TextBox YearStart = (TextBox)e.Item.FindControl("txtLname"); TextBox YearEnd = (TextBox)e.Item.FindControl("txtCtype"); } else if (e.CommandName == "Update") { TextBox txtId = (TextBox)e.Item.FindControl("txtUpId"); TextBox txtFname = (TextBox)e.Item.FindControl("txtUpFname"); TextBox txtLname = (TextBox)e.Item.FindControl("txtUpLname"); TextBox txtCtype = (TextBox)e.Item.FindControl("txtUpCtype"); } else if (e.CommandName == "Delete") { TextBox txtId = (TextBox)e.Item.FindControl("txtUpId"); } else if (e.CommandName == "Edit") { Label lblInstituteId = (Label)e.Item.FindControl("lblId"); Label lblYearStart = (Label)e.Item.FindControl("lblStartYr"); Label lblYearEnd = (Label)e.Item.FindControl("lblEndYr"); TextBox tbxInstituteID = (TextBox)e.Item.FindControl("txtFname"); TextBox tbxtbxYearStart = (TextBox)e.Item.FindControl("txtLname"); TextBox tbxYearEnd = (TextBox)e.Item.FindControl("txtCtype"); tbxInstituteID.Text = lblInstituteId.Text; tbxtbxYearStart.Text = lblYearStart.Text; tbxYearEnd.Text = lblYearEnd.Text; this.ModalPopupExtenderQ.show(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)