473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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
1 2245
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Sam Collett | last post by:
How do I remove an item with a specified value from an array? i.e. array values 1,2,2,5,7,12,15,21 remove 2 from array would return 1,5,7,12,15,21 (12 and 21 are NOT removed, duplicates are...
16
by: cwizard | last post by:
I'm calling on a function from within this form, and there are values set but every time it gets called I get slammed with a run time error... document.frmKitAmount.txtTotalKitValue is null or not...
21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
31
by: Chris Stanley | last post by:
I am using dreamweaver to make an ASP page. I have a table of data from a MSSQL database that is currently showing on the ASP page. I want the ability to change the color based on a priority...
1
by: cching | last post by:
Hi, I'm trying to turn this: <Component> <Properties> <Property Name="X" Value="200" /> <Property Name="Y" Value="200" /> <Property Name="Width" Value="100" /> <Property Name="Height"...
7
by: stephan querengaesser | last post by:
hi ng, i try to invoke a webservice-method with an filter-object, that contains value types. if i donīt want to filter the return value of the method, i have to pass a new instance of the...
7
by: turtle | last post by:
I want to find out the max value of a field on a report if the field is not hidden. I have formatting on the report and if the field doesn't meet a certain criteria then it is hidden. I want to...
6
by: ashraf02 | last post by:
hi i am trying to insert a record via a form using php and mysql and when i try to submit the form it comes up with the following error Column count doesn't match value count at row 1 if...
1
AaronL
by: AaronL | last post by:
Hello, First I would like to say thank you all for your help in the past. I am stumped again. I am creating an e-commerce system and I want to be able to upload images to the server and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.