2
Answers

needed: C# equivelent of GetElementByID

Administrator

Administrator

21y
6.7k
1
hi, Here is the Scenario.... I have a hashtable, Key is a number, value is the textbox that I want to populate (ie/ FirstNameTextbox). I want to be able to get that value out of there, and populate THAT textbox with a value. ie/ the code COULD look like this: FirstNameTextbox.Text = "some Value"; ...but i am doing this with Hundreds of textbox's, so I'd like to be able to write a method to do this, something like this: public void PopulateTextbox(string textBoxName, string textBoxValue){ ????????????????????????????????????????? } what is the line I am missing? I think it should be something like: Page.GetElementbyID("textBoxName").Value = textBoxValue; can anyone help me????
Answers (2)