Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
18
Reply
how to chk or unchk using images in asp.net?
anjali khan
Jan 5 2016 12:43 AM
507
Reply
hi frnds,
i wants to display using image button click, my code is working but again if i click on checked image so it is not coming in unchk condition....
this is my code
design page
<div>
<asp:CheckBox ID="chkbox1" runat="server" Style="display: none" AutoPostBack="True" BackColor="Gray" OnCheckedChanged="chkbox1_CheckedChanged1" />
<label for="chkbox1">
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/checkbox_unchecked.png" AutoPostBack="True" OnClick="ImageButton1_Click"/>
</label>
</div>
code////
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
ImageButton1.ImageUrl = "~/Images/checkbox_checked.png";
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
18
)
Next Recommended Forum
Display and download a file in Asp.Net
Website Pages aur theme