Loop through textboxes in a gridview

S

Steve

One of the columns in my gridview is a blank textbox (I have added it
as a template field). Users can enter a number in the textbox for a
multiple of the gridview records.

I have a submit button which is intended to use code behind to access
these textbox values and eventually add them to a database.

However, I can't seem to loop through the textboxes in the gridview
successfully and store their values. Does anyone know the right syntax
for accessing these textbox values using a For and Next statement?

Thank you.
 
E

Eliyahu Goldin

Loop through the gridview Rows collection. For every row find the textbox
with FindConrol method.
 
S

Steve

Could you please give me an example of the syntax to be used?


Eliyahu said:
Loop through the gridview Rows collection. For every row find the textbox
with FindConrol method.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

Steve said:
One of the columns in my gridview is a blank textbox (I have added it
as a template field). Users can enter a number in the textbox for a
multiple of the gridview records.

I have a submit button which is intended to use code behind to access
these textbox values and eventually add them to a database.

However, I can't seem to loop through the textboxes in the gridview
successfully and store their values. Does anyone know the right syntax
for accessing these textbox values using a For and Next statement?

Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top