I have managed to write a code that could generate textboxes on-the-fly.
The code is given below:
<script language="vb" runat="server">
Sub Page_Load()
Dim num as Integer
Dim counter as Integer
If Request.Form("select")<>"" Then
num=Request.Form("select")
Message.Text=""
For counter = 1 To num
Message.Text=Message.Text & _
"<table><tr><td>Name</td><td><input type=text id=txtName></td></tr><tr><td>Email</td><td><input type=text name=txtEmail><td/></tr></table>"
Next counter
End If
End Sub
</script>
<html>
<head></head>
<body>
Enter the number of attendances
<br/>
<form runat="server">
<asp:label id="Message" runat="server"/>
<asp:DropDownList id="select" runat="server">
<asp:listitem value=1/>
<asp:listitem value=2/>
<asp:listitem value=3/>
<asp:listitem value=4/>
<asp:listitem value=5/>
<asp:listitem value=6/>
</asp:DropDownList>
</br>
<input type="submit" value="Select" id="smt">
</form>
</body>
</html>
Could someone tell me how to get the data from these dynamically created texboxes.
CEO InteliSoft
Maqsood ur Rahman