<table class="style1" style="border:Solid 2px #5272B8; border-top-width:0px;" cellspacing="0"> <tr style="background-color:#507CD1; color:Black;"><td class="style85"> </td> <td align="left"> <b>Add Here</b> </td> <td align="right"> <asp:ImageButton ID="ImageButton3" runat="server" Height="16px" ImageUrl="Images/closeicon.png" style="margin-right:0px;" Width="16px" /> </td> <tr> <td> </td> <td align="left"> Category: <asp:Label ID="lblcategorypopup" runat="server" Text="Label" Font-Bold="true"></asp:Label> Model: <asp:Label ID="lblmodelpopup" runat="server" Text="Label" Font-Bold="true"></asp:Label></td> <td align="right"> </td> </tr> <tr> <td> </td> <td align="left"> <asp:Panel ID="panelserial" runat="server"> </asp:Panel> </td> <td align="right"> </td> </tr> <tr> <td> </td> <td align="left"> <asp:Button ID="btnaddpopup" runat="server" Text="Add" CssClass="button2" onclick="btnaddpopup_Click" /> </td> <td align="right"> </td> </tr> </table>
int n = Convert.ToInt32(txtqunty.Text); for (int i = 0; i < n; i++) { TextBox MyTextBox = new TextBox(); //Assigning the textbox ID name MyTextBox.ID = "txtserialnum" + "" + ViewState["num"] + i; MyTextBox.Width = 200; MyTextBox.Height = 15; MyTextBox.TextMode = TextBoxMode.SingleLine; panelserial.Controls.Add(MyTextBox); Literal li = new Literal(); li.Text = ""; panelserial.Controls.Add(li); } Modelpopserial.Show();
protected void btnaddpopup_Click(object sender, EventArgs e) { TextBox txtsno = (TextBox)panelserial.FindControl("MyTextBox"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)