Hi,
I am looping thru a textlist, based on a variable.
The asp.net then opens the file (same filename as variable).
The file has one line per item, like so:
blah
foo
bar
The thing is that if I have the inputs blah, foo, bar, etc. I want the fields which correspond to be set to visible.
I think, however, that I might be "attacking" at the wrong end. Maybe I could enumerate controls in the web-form, loop thru them?
I want some pointers, tips/examples, if anyone knows anything about this sort of action.
The general idea, is that I'll have all the controls in the web-form,so the users can edit textfiles to config which fields should be visible for which input-type.
My idea was
My problem, however, is that it's not possible to cast the variable (from the loop) to a textbox for the byval value? If it where possible, this would be very easy!
Hope someone can help!
Olav Alexander Mjelde
Admin & Webmaster
I am looping thru a textlist, based on a variable.
The asp.net then opens the file (same filename as variable).
The file has one line per item, like so:
blah
foo
bar
The thing is that if I have the inputs blah, foo, bar, etc. I want the fields which correspond to be set to visible.
I think, however, that I might be "attacking" at the wrong end. Maybe I could enumerate controls in the web-form, loop thru them?
I want some pointers, tips/examples, if anyone knows anything about this sort of action.
The general idea, is that I'll have all the controls in the web-form,so the users can edit textfiles to config which fields should be visible for which input-type.
My idea was
Code:
Private Function ToggleFields(ByVal fld As TextBox)
fld.Visible = True
End Function
My problem, however, is that it's not possible to cast the variable (from the loop) to a textbox for the byval value? If it where possible, this would be very easy!
Hope someone can help!
Olav Alexander Mjelde
Admin & Webmaster