I can't seem to find an answer to this problem. Please read below.
Hi,
A while back I posted this thread, but never got the answer I was looking for. Now that more people have had experience with asp.net, perhaps someone may be able to solve this problem. Here is my original question:
I have a problem. I have a hash that has its keys bound to an asp:radiobuttonlist. When the form is submitted, the keys are checked. If a certain key matches the checked radio button, I spit out the value at that key. The value is an array full of links.
What I also have are asp:labels, each has an id that is the same as a key in the hash. I want to make that label appear. but i can't get it to work.
Here is a sample:
match is an array. I later use it to bind to an asp:repeater for all the links.
The problem is mykey2.visible. Since mykey2 is a key, it really isn't an asp:label; so the .visible property doesn't work. But how do I get it so that I can use the key to be the id of the asp:label? That is my problem.
BTW, this suggestion failed:
Mike
Hi,
A while back I posted this thread, but never got the answer I was looking for. Now that more people have had experience with asp.net, perhaps someone may be able to solve this problem. Here is my original question:
I have a problem. I have a hash that has its keys bound to an asp:radiobuttonlist. When the form is submitted, the keys are checked. If a certain key matches the checked radio button, I spit out the value at that key. The value is an array full of links.
What I also have are asp:labels, each has an id that is the same as a key in the hash. I want to make that label appear. but i can't get it to work.
Here is a sample:
Code:
for each mykey2 in h.keys
if mykey2 = RBL.selecteditem.text then
match = h(mykey2) 'array set to another array
mykey2.visible = true
end if
next
match is an array. I later use it to bind to an asp:repeater for all the links.
The problem is mykey2.visible. Since mykey2 is a key, it really isn't an asp:label; so the .visible property doesn't work. But how do I get it so that I can use the key to be the id of the asp:label? That is my problem.
BTW, this suggestion failed:
Code:
CType(mykey2, Label).Visible = True
Mike