Is there any way to create tablerows based on the value of a dropdownlist?
I.e dropdown contains values 1 through 10.
User selects 5. 5 Tablerows are created.
I was thinking something along the lines of
i=dropdown.selectedvalue
so i=5...
For x = 1 to i
<TR>
<TD>
<asp:dropdownlist id=dd<%=x%></asp:dropdownlist>.
<asp:textbox id=Textbox1<%=x%> runat=server></asp:textbox>.
<asp:textbox id=Textbox2<%=x%> runat=server></asp:textbox>.
<asp:textbox id=Textbox3<%=x%> runat=server></asp:textbox>.
<asp:textbox id=Textbox4<%=x%> runat=server></asp:textbox>
</TD>
</TR>
That is the way I did it in asp but it craps out on the <%%>.
Is there a way to create the controls dynamically, giving them ids?
Another issue is the placement on the page. I tried writing it out to a label to make it
appear where I want instead of the top of the page. That worked fine but I couldn't get
dropdowns created.
Thanks for the help
I.e dropdown contains values 1 through 10.
User selects 5. 5 Tablerows are created.
I was thinking something along the lines of
i=dropdown.selectedvalue
so i=5...
For x = 1 to i
<TR>
<TD>
<asp:dropdownlist id=dd<%=x%></asp:dropdownlist>.
<asp:textbox id=Textbox1<%=x%> runat=server></asp:textbox>.
<asp:textbox id=Textbox2<%=x%> runat=server></asp:textbox>.
<asp:textbox id=Textbox3<%=x%> runat=server></asp:textbox>.
<asp:textbox id=Textbox4<%=x%> runat=server></asp:textbox>
</TD>
</TR>
That is the way I did it in asp but it craps out on the <%%>.
Is there a way to create the controls dynamically, giving them ids?
Another issue is the placement on the page. I tried writing it out to a label to make it
appear where I want instead of the top of the page. That worked fine but I couldn't get
dropdowns created.
Thanks for the help