binding table data with img tag instead of image control in asp.net
-
hi, what i want:- bind database value in .aspx page in a data control like datalist but i want to apply jquery on it bcaz want to show effects on it The Problem :-downloaded jquery only works with img tag but in datalist i can use image control so....jquery is not working is there any way for 1. binding database values with img tag instead of image control OR 2. can jquery work with img control if anybody knows pls pls reply me thnkxx in advance
-
hi, what i want:- bind database value in .aspx page in a data control like datalist but i want to apply jquery on it bcaz want to show effects on it The Problem :-downloaded jquery only works with img tag but in datalist i can use image control so....jquery is not working is there any way for 1. binding database values with img tag instead of image control OR 2. can jquery work with img control if anybody knows pls pls reply me thnkxx in advance
-
hi, what i want:- bind database value in .aspx page in a data control like datalist but i want to apply jquery on it bcaz want to show effects on it The Problem :-downloaded jquery only works with img tag but in datalist i can use image control so....jquery is not working is there any way for 1. binding database values with img tag instead of image control OR 2. can jquery work with img control if anybody knows pls pls reply me thnkxx in advance
-
hi, what i want:- bind database value in .aspx page in a data control like datalist but i want to apply jquery on it bcaz want to show effects on it The Problem :-downloaded jquery only works with img tag but in datalist i can use image control so....jquery is not working is there any way for 1. binding database values with img tag instead of image control OR 2. can jquery work with img control if anybody knows pls pls reply me thnkxx in advance
Sir; Dose m@dhu's answer solve your problem?
Help people,so poeple can help you.
-
hi, my prob is that i want to implement jquery on images bt images are in database. i can bind them and able to show with image control but the problem is that jquery is not working in image control. it works with img tag
-
Member 7980675 wrote:
binding database values with img tag instead of image control
For asp.net Image control path is given to
ImageUrl
<asp:Image ID="img1" runat="server" ImageUrl='<%# Eval("path") %>'></asp:Image>
For HTML img path is set to
src
hello, thanz for this but my prob is that i want to implement jquery on images bt images are in database. i have done this with image control but the problem is that jquery is not working in image control. it works with img tag
-
Sir; Dose m@dhu's answer solve your problem?
Help people,so poeple can help you.
have replied sir .....:)
-
hello, thanz for this but my prob is that i want to implement jquery on images bt images are in database. i have done this with image control but the problem is that jquery is not working in image control. it works with img tag
please send me the HTML and the behind code you tried on.
Help people,so poeple can help you.
-
please send me the HTML and the behind code you tried on.
Help people,so poeple can help you.
in .aspx page... <asp:DataList ID="DataList1" runat="server" RepeatDirection="Horizontal" RepeatColumns="4" RepeatLayout="Table" CellPadding="5" CellSpacing="10" onitemcommand="DataList1_ItemCommand" > <ItemTemplate> <div> <%--<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%#Eval("image_name") %>' height="200" width="120" BorderColor = "#FFCC01" BorderStyle = "outset" BorderWidth = "8" CommandName="img" CommandArgument = '<%#Eval("image_id") %>'/>--%> <p><img id="image1" runat="server" border="0" src='<%#Eval("image_name") %>' style="border-color:#FFCC01;border-style:outset;border-width:8px;" height="200" width="120" /><p> <br /> </div> </ItemTemplate> </asp:DataList> in this page i want jquery on img tag...and in that it takes src value of img tag and zoom it bt in case of eval function its not working..... is simple word if i use simple img tag and give value of any image then jquery is working fine bt wen i give eval function bcaz images are in database then jquery is not working.....
-
in .aspx page... <asp:DataList ID="DataList1" runat="server" RepeatDirection="Horizontal" RepeatColumns="4" RepeatLayout="Table" CellPadding="5" CellSpacing="10" onitemcommand="DataList1_ItemCommand" > <ItemTemplate> <div> <%--<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%#Eval("image_name") %>' height="200" width="120" BorderColor = "#FFCC01" BorderStyle = "outset" BorderWidth = "8" CommandName="img" CommandArgument = '<%#Eval("image_id") %>'/>--%> <p><img id="image1" runat="server" border="0" src='<%#Eval("image_name") %>' style="border-color:#FFCC01;border-style:outset;border-width:8px;" height="200" width="120" /><p> <br /> </div> </ItemTemplate> </asp:DataList> in this page i want jquery on img tag...and in that it takes src value of img tag and zoom it bt in case of eval function its not working..... is simple word if i use simple img tag and give value of any image then jquery is working fine bt wen i give eval function bcaz images are in database then jquery is not working.....
I think that there is no differences between both case, because image src would be rendered in the same way. What I think is you used image ids in the jquery selector. try this:
<asp:DataList ID="DataList1" runat="server"
RepeatDirection="Horizontal"
RepeatColumns="4"
CellPadding="5"
CellSpacing="10"<ItemTemplate> <div> <p><img id="image1" runat="server" border="0" src='<%#Eval("image\_name") %>' style="border-color:#FFCC01;border-style:outset;border-width:8px;" height="200" width="120" /><p> <br /> </div> </ItemTemplate>
</asp:DataList>
<script type="text/javascript">
$(document).ready( function() {
$("#<%= DataList1.ClientID %> img").animate();
});
</script>We used the selector
$("#<%= DataList1.ClientID %> img")
beacase the markups would be renderer as<table id="DataList1.ClientID">
<tr><td>
<img id="DataList1.ClientID_ctr100_Image1" ... />
</td> ... </tr>
...</table>
Good luck ;)
Help people,so poeple can help you.
-
I think that there is no differences between both case, because image src would be rendered in the same way. What I think is you used image ids in the jquery selector. try this:
<asp:DataList ID="DataList1" runat="server"
RepeatDirection="Horizontal"
RepeatColumns="4"
CellPadding="5"
CellSpacing="10"<ItemTemplate> <div> <p><img id="image1" runat="server" border="0" src='<%#Eval("image\_name") %>' style="border-color:#FFCC01;border-style:outset;border-width:8px;" height="200" width="120" /><p> <br /> </div> </ItemTemplate>
</asp:DataList>
<script type="text/javascript">
$(document).ready( function() {
$("#<%= DataList1.ClientID %> img").animate();
});
</script>We used the selector
$("#<%= DataList1.ClientID %> img")
beacase the markups would be renderer as<table id="DataList1.ClientID">
<tr><td>
<img id="DataList1.ClientID_ctr100_Image1" ... />
</td> ... </tr>
...</table>
Good luck ;)
Help people,so poeple can help you.
hello sir, yuppppiiiiii it worked....thanxxx a lot m so happy..thanku so much for ur reply........ u really helped me thankss to all