T
TJS
I want to change visiblity of an image button based upon user selection in a
drop list
using sub below but it is not making the image visibility change when the
droplist selection changes,
what is missing ?????
....
Sub dropUsersSelInxChng(s As Object, e As EventArgs)
if allUsers.SelectedItem.Value = "1" then
Imagebutton2.Visible="False"
else
Imagebutton2.Visible="True"
end if
End Sub
....
<asp
ropDownList OnSelectedIndexChanged="dropUsersSelInxChng"
id="allUsers" runat="server" DataTextField="Email"
DataValueField="UserID"></asp
ropDownList>
<asp:ImageButton id="Imagebutton2" Visible="true"
onclick="DeleteUser_Click" runat="server" ImageUrl="~/images/delete.gif"
AlternateText="Delete this user"></asp:ImageButton>
drop list
using sub below but it is not making the image visibility change when the
droplist selection changes,
what is missing ?????
....
Sub dropUsersSelInxChng(s As Object, e As EventArgs)
if allUsers.SelectedItem.Value = "1" then
Imagebutton2.Visible="False"
else
Imagebutton2.Visible="True"
end if
End Sub
....
<asp
id="allUsers" runat="server" DataTextField="Email"
DataValueField="UserID"></asp
<asp:ImageButton id="Imagebutton2" Visible="true"
onclick="DeleteUser_Click" runat="server" ImageUrl="~/images/delete.gif"
AlternateText="Delete this user"></asp:ImageButton>