jccorner Posted April 7, 2004 Posted April 7, 2004 Here's the deal: I have a webform with twenty five lines each looking like: Age: <textfield> Gender: <combobox> Status: <textfield> My question is this, can I use a repeater to dynamically reference each text field or combobox ie. <asp:textbox id="Age<%# num %>" runat="server"></asp:textbox> That way it could save me a lot of cutting and pasting and from making various changes. The next question is can I build a link for each row dynamically?? If so, would you have any examples?? Thank you. Quote Applying computer technology is simply finding the right wrench to pound in the correct screw
Administrators PlausiblyDamp Posted April 7, 2004 Administrators Posted April 7, 2004 You are probably better looking at the DataList control, it will allow you to define an item template which contains the controls you want in each row and then databind it. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
darker080 Posted April 7, 2004 Posted April 7, 2004 I think it's possible 2 use the repeater control... http://www.sitepoint.com/article/asp-net-repeater-control this link was very usefull when i was using this control. plz let me know if it's usefull Quote
jccorner Posted April 12, 2004 Author Posted April 12, 2004 darker, I did find that webpage when I googled my problem, but what I'm trying to accomplish is to be able to take in information. I want to be able to list twenty-five textboxes and have a user enter the information and then have the information written into the db. I might be overanalyzing this technique, but if I have the repeater "repeat" one textbox twenty-five times will it automatically name each textbox, textbox1, textbox2, textbox3 ...?? This is still a problem, because I have three columns on the page and will need to know the names of all seventy-five textboxes for coding reasons. I must think someone else has run into this issue of someone filling out rows and rows of the same information on one form and having to spin through the data to enter into a db. Thank you for your help. Quote Applying computer technology is simply finding the right wrench to pound in the correct screw
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.