Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jun 05, 2012 10:56 AM by w_nairb
Member
9 Points
14 Posts
Jun 05, 2012 10:03 AM|LINK
How to change the ImageUrl of the ImageButton which resides inside in the GridView control based on current ImageUrl of that ImageButton.
JQuery javascript
All-Star
15346 Points
3142 Posts
Jun 05, 2012 10:07 AM|LINK
><asp:Imagebutton height=100 width=75 ImageURL='<%# Container.DataItem("ImagePath") + Container.DataItem("ImagePath1") %>' runat="server" />
114 Points
37 Posts
Jun 05, 2012 10:56 AM|LINK
// Control <asp:ImageButton AlternateText="Select" CausesValidation="false" CommandName="Select" CssClass="arrow_right" ID="ibSelect" ImageUrl="~/assets/img/arrow_right_grey.gif" runat="server" ToolTip="Select" />
// jQuery <script src="/assets/js/jquery/jquery-1.7.2.min.js" type="text/javascript"></script> <script type="text/javascript"> function pageLoad() { // Toggle image on mouseover $('.arrow_right').mouseover(function () { $(this).attr("src", "../assets/img/arrow_right_green.gif"); }).mouseout(function () { $(this).attr("src", "../assets/img/arrow_right_grey.gif"); }); }; </script>
katareraju
Member
9 Points
14 Posts
Change ImageUrl of ImageButton inside the GridView with JavaScript/JQuery
Jun 05, 2012 10:03 AM|LINK
How to change the ImageUrl of the ImageButton which resides inside in the GridView control based on current ImageUrl of that ImageButton.
JQuery javascript
Mudasir.Khan
All-Star
15346 Points
3142 Posts
Re: Change ImageUrl of ImageButton inside the GridView with JavaScript/JQuery
Jun 05, 2012 10:07 AM|LINK
><asp:Imagebutton height=100 width=75
ImageURL='<%# Container.DataItem("ImagePath") + Container.DataItem("ImagePath1") %>'
runat="server" />
w_nairb
Member
114 Points
37 Posts
Re: Change ImageUrl of ImageButton inside the GridView with JavaScript/JQuery
Jun 05, 2012 10:56 AM|LINK
// Control
<asp:ImageButton AlternateText="Select" CausesValidation="false" CommandName="Select" CssClass="arrow_right" ID="ibSelect" ImageUrl="~/assets/img/arrow_right_grey.gif" runat="server" ToolTip="Select" />
// jQuery
<script src="/assets/js/jquery/jquery-1.7.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
function pageLoad() {
// Toggle image on mouseover
$('.arrow_right').mouseover(function () {
$(this).attr("src", "../assets/img/arrow_right_green.gif");
}).mouseout(function () {
$(this).attr("src", "../assets/img/arrow_right_grey.gif");
});
};
</script>
JQuery javascript