By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,300 Members | 1,795 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,300 IT Pros & Developers. It's quick & easy.

How to get value of repeat same id name text box item in web

P: n/a
Hi

I am developing web page using asp.net with c# coding. I would like to know how can i get the value of repeat same id name text box item in my aspx web page
Let say i have textbox name "txtname". and it actually appears in the web page many time as a list. In order for me to get the value in the aspx.cs page, how can i do that

thank

Warm regards
Zachary
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You could use the FindControl method

// Assuming multiple instances of the "txtname" control
foreach(Control ctl in this.Controls

if(ctl.ID == "txtname"

TextBox txtFound = (TextBox)ctl;
// do somethin

Cheers
Jonathan Rucker

----- Zachary wrote: ----

Hi

I am developing web page using asp.net with c# coding. I would like to know how can i get the value of repeat same id name text box item in my aspx web page
Let say i have textbox name "txtname". and it actually appears in the web page many time as a list. In order for me to get the value in the aspx.cs page, how can i do that

thank

Warm regards
Zachary
Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.