Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

Acces text box value based on index

$
0
0

Hi,

I have tried to access textbox value based on index

For ex if i have controls  TextBox1 and TextBox2 in my aspx page

in my code behind we can access text property like below,

TextBox1.Text = "suresh";
TextBox2.Text = "Rajesh";

but i just want to access based on index like below,

int i=1;
TextBox(i.ToString).Text="suresh";

but this is throwing error.

Can pls tell me how can i access control using index?

thanks,
suresh


Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>