G
Guest
H
Im self learning asp.net, so I may be doing mistakes. But I found something that may be a "bug"...at least for me it looks as inconsistent
I explain myself. I have a repeater and inside of it I have hidden textboxes (visible="False") with values that are set during runtime (I do a loop in a datareader to set them). If I trace the code, you can see that the values are assigned to this textboxes correctly. Once I postback the form I try to get the values from the textboxes that are inside the repeater ( I do a recursive findControl on the repeater to find the control and then grab its value). Instead of getting the value I gave to the textbox during run time I get the value that I set it to during design time in the HTML view ("0")
If I set the control to "visible="true"" for testing purposes the control is read properly in runtime and it has its value is what was expected
What it really puzzles me is that outside the repeater I do the same thing with a textbox that is hidden -in the main form- and I can get the correct value of it, even if the visible value is set to false
Isn't this a strange behaviour in the textbox control? am I doing something wrong? is this what it should happen
any answers are welcome
Im self learning asp.net, so I may be doing mistakes. But I found something that may be a "bug"...at least for me it looks as inconsistent
I explain myself. I have a repeater and inside of it I have hidden textboxes (visible="False") with values that are set during runtime (I do a loop in a datareader to set them). If I trace the code, you can see that the values are assigned to this textboxes correctly. Once I postback the form I try to get the values from the textboxes that are inside the repeater ( I do a recursive findControl on the repeater to find the control and then grab its value). Instead of getting the value I gave to the textbox during run time I get the value that I set it to during design time in the HTML view ("0")
If I set the control to "visible="true"" for testing purposes the control is read properly in runtime and it has its value is what was expected
What it really puzzles me is that outside the repeater I do the same thing with a textbox that is hidden -in the main form- and I can get the correct value of it, even if the visible value is set to false
Isn't this a strange behaviour in the textbox control? am I doing something wrong? is this what it should happen
any answers are welcome