B
BLACKDOG157
I have to make a form with a variable number of textboxes. If, in the
previous screen, the user chose a 2 day hotel stay, I need to input the
number of rooms for 2 days. But if in the previous screen, he chose a
5 day hotel stay, then I need to input the number of rooms for 5 days.
I tried a 'for' loop - something like this
for Number = 1 to NumRooms
strDiv = strDiv & "<ASP:Textbox id="room" & Number runat=""server""
/>
Next
and then I did "DivResult.InnerHtml = strDiv"
But that does not work. When I do a 'view-source' I see that the
source has:
<ASP:Textbox id="room1" runat="server" />
<ASP:Textbox id="room2" runat="server" />
etc.
But that means that asp.net is not interpreting the strings.
Any help is appreciated.
-- BD
previous screen, the user chose a 2 day hotel stay, I need to input the
number of rooms for 2 days. But if in the previous screen, he chose a
5 day hotel stay, then I need to input the number of rooms for 5 days.
I tried a 'for' loop - something like this
for Number = 1 to NumRooms
strDiv = strDiv & "<ASP:Textbox id="room" & Number runat=""server""
/>
Next
and then I did "DivResult.InnerHtml = strDiv"
But that does not work. When I do a 'view-source' I see that the
source has:
<ASP:Textbox id="room1" runat="server" />
<ASP:Textbox id="room2" runat="server" />
etc.
But that means that asp.net is not interpreting the strings.
Any help is appreciated.
-- BD