Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why do Image Buttons do not work?

Status
Not open for further replies.

NMDUC

Programmer
Mar 4, 2006
61
VN
Hi,
I have a list of Image Buttons like this.

<div id="nav">
<ul>
<li><asp:ImageButton ImageUrl="~/images/profile.jpg" runat="server" ID="ibtnProfile" AlternateText="Profile" Enabled='<%# (HttpContext.Current.User.Identity.Name != null) && (HttpContext.Current.User.Identity.Name != "") %>' OnClick="ibtnProfile_Click" /></li><!--
--><li><asp:ImageButton ImageUrl="~/images/reviews.jpg" runat="server" ID="ibtnReviews" AlternateText="Reviews" OnClick="ibtnReviews_Click"/></li><!--
--><li><asp:ImageButton ImageUrl="~/images/myblog.jpg" runat="server" ID="ibtnMyBlog" AlternateText="My Blog" OnClick="ibtnMyBlog_Click"/></li><!--
--><li><asp:ImageButton ImageUrl="~/images/friends.jpg" runat="server" ID="ibtnFriends" AlternateText="Friends" OnClick="ibtnFriends_Click"/></li><!--
--><li><asp:ImageButton ImageUrl="~/images/bookmarks.jpg" runat="server" ID="ibtnBookmark" AlternateText="Bookmark" OnClick="ibtnBookmark_Click"/></li><!--
-->
</ul>
</div>

And the click events are on code behind.
protected void ibtnReviews_Click(object sender, ImageClickEventArgs e)
{
....
}
........

When I click on the image buttons, it will call the suitable event. However, sometimes it does not work- nothing happened when I click on the image button.

Please help me. Thank in advance.
Du
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top