Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create form field names on the fly.

Status
Not open for further replies.

bbwrede

Programmer
May 22, 2003
52
0
0
US
Hi, I am new to ASP.NET, but very familier with ASP and am trying to use dynamically created field names. For example, I have a database with survey questions. I dynamically generate the form field names. (question1, question2 etc.) I can't figure out how to access them. In old asp you could use an eval statment to generate the name and access the field in your post to page.
This is my textbox:
<code>
<INPUT type=&quot;text&quot; name=&quot;question<%=CStr(questionNum)%>&quot; size=&quot;<%=CStr(QuarterReader.GetInt32(3))%>&quot;>
</code>

How do I access the above field in my &quot;Button1_Click&quot; event.

Thanks for any help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top