.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

image button in datalist

Posted By:      Posted Date: October 06, 2010    Points: 0   Category :ASP.Net

i have stored the image url  in the database.

i have a image button in datalist.i want that when i click that imagebutton i get its url of that particular row.


View Complete Post

More Related Resource Links

datalist image slide show problem


hi friends

i am binding  images dynamically(back end)for a datalist .iam applying a slideshow for it .I am getting a problem to apply slideshow for dyanmically binded images.If the define in a div statically it working perfectly

for example pls go through my code below:

<script type="text/javascript">
$(document).ready(function() {
        fx: 'scrollLeft' // choose your transition type, ex: fade, scrollUp, shuffle, etc...

<div class="slideshow">
        <img src="images/30_dummy.jpg" width="200" height="200" />
        <img src="images/aquarius.gif" width="200" height="200" />
        <img src="images/star.gif" width="200" height="200" />
        <img src="images/the-proud-indian-flag-1.jpg" width="200" height="200" />

I above code works perfectly and the slide show e

Gridview with Image Button


i have a gridview and i want to perform edit and delete with an image button

but unable to figure out the events and how i m gonna make my grid into edit mode ??

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                <asp:TemplateField HeaderText="S.No">
                        <asp:Label ID="Label1" runat="server" Text='<%# Container.DataItemIndex+1 %>'></asp:Label>
                <asp:TemplateField HeaderText="Edit">
                        <asp:ImageButton ID="ImageButton1" runat="server" ImageAlign="Middle" 
                            ImageUrl="~/image/ico_edit.gif" CommandName="Edit" 
                            onclick="ImageButton1_Click" />
                <asp:TemplateField HeaderText="Delete">

how to set multiple button in single image


Hi friends,

I need to make multiple button in a single image in asp.net.

and need coding also for vb.net.

thanx in advance

change image button image


i am making a web form with a VB code behind.  on the form I have a down arrow imageButton that when pressed hides certain data.  what i want to do is change the button to an up arrow and vice versa whenever pressed.  i have both images loaded onto my project already.  any suggestions.

thank you

Open in new window option for Image Button

I am using an Image Button with onclientclick property set.Upon clicking the button I am able to navigate to URL page. But when I am right clicking on the Image Button I am not getting "Open in new window" or "Open in new tab". These options I see when I right click on an Hyperlink control.Can we achieve the same fro Image Button. If so how?Thank you,Praveen.

image as a button

hi alli would like to use an image i created with web button maker as a button in my formwhere do i put the postback action for the button?thank you

Change image button image on hover

Hoep this si simple I would like to change the image in an image button when the user hovers over it ..can anyone helpThanks  

image button click in listview with scriptmanager

 I am using scriptmanager in masterpage and my imagebutton click event is not being found in code behind and my javascript is not working and no events are firing. In fact, the imagebutton does not change the mouse icon to a hand when hovering... help!  <asp:UpdatePanel ID="upTabControl" runat="server" UpdateMode="Conditional"> <Triggers> <asp:AsyncPostBackTrigger ControlID="tabControlScriptManagerTabStrip" /> <asp:PostBackTrigger ControlID="scriptManagerTabStripMultiPage" /> <asp:AsyncPostBackTrigger ControlID="ctrl_List_View_Images1$lv_Items_Images" /> <asp:AsyncPostBackTrigger ControlID="ContractDocumentUpload1" /> </Triggers> <ContentTemplate> <telerik:RadTabStrip ID="tabControlScriptManagerTabStrip" runat="server" SelectedIndex="0" Skin="Web20" MultiPageID="scriptManagerTabStripMultiPage" AutoPostBack="True" OnTabClick="RadTabStrip1_TabClick"> <Tabs> <telerik:RadTab Text="Blog" runat="server" MultiPageID="scriptManagerMultiPag

Button in datalist, open new window with query string

hi everyone,i'm writing a button which need to open a new window and sending binded data as query string:<asp:DataList ID="DataList_Comment" runat="server" DataKeyField="Comment_id" DataSourceID="CommentDataSource" Width="482px"> <ItemTemplate> .... <br /> <input type="hidden" name="comment_id" id="comment_id" value='<%# Eval("Comment_id") %>' /> <input id="Button1" type="button" value="button" onclick="open_win(comment_id.value)" /> </ItemTemplate> </asp:DataList> here is the open_win function:<script type="text/javascript"> function open_win(id) { var url = "Report.aspx?type=comment&id=" + id; window.open(url); } </script> But the url created is ".../Report.aspx?type=comment&id=undefined", the queryString["id"] is not defined.In the calling page source html, comment_id has value.<input type="hidden" name="comment_id" id="comment_id" value='2' /> How can i set the variable value of "comment_id" in button onclick, to call the javascript o

Javascript in Datalist .... on click of Button Show details in Another DIV

Hello Experts My Question is how to Set / call javascript in a Datalist , Where to define / Add Attrbutes for that / My Functionatilty requires on click of a button i have to show details in another DIVThanks ... Any Code Example is Much appreciated .. Thanks

Rebind datalist after upload an image using jquery


Hi, I'm having a problem with using jquery to trigger a datalist rebind here, hope people here could help me with it. 

I'm using a jquery plugin called uploadify to upload images to my database. I'd like my datalist to be auto-rebind after the images' been uploaded so people could see the changes immediately. Also because this is a feature for admin there is a delete button in the datalist. I used updatePanel for this.  

I put __doPostBack('" + upnlUploaded.ClientID + "','') to the javascript so when Images have been uploaded the update panel will postback. 

I also have the following two lines to make it working... 

<asp:UpdatePanel ID="upnlUploaded" runat="server" UpdateMode="Conditional" OnLoad="upnlUploaded_Load"> <%--upnlUploaded_Load   --%>

       <asp:UpdatePanel ID="upnlUploaded" runat="server" UpdateMode="Conditional" OnLoad="upnlUploaded_Load"

        protected void upnlUploaded_Load(object sender, EventArgs e)

How to retrive client name ,Field , and Image from Database and show in datalist?


hi experts,

i wanat to display Client Name, Field and  image in datalist. Stored Procedure like this

ALTER proc [dbo].[get_clients_services]
SELECT     Clients.ClientName AS Client, Fields.FieldName AS Field, ServiceType.ServiceType AS Services, ServiceType.Servicelink AS Link, 
                      Clients.ClientLogo AS Logo
FROM         Clients INNER JOIN

How to create a button with image and text


Currently I have button on a form and I need to make buttons image but maintain the click event functions that they have. For instance I have a button that says Update. Is there a way to add an image and put text in that image that says Update and maintain it's functionality. here is the code for the button:

<asp:Button ID="btnUpdate" runat="server" Text="Update" Visible="False" />


image in datalist who are one over another


hi there
i am creating a new web site : http://www.my-restaurantbooking.com/ricerca.aspx
as you can see in the 4th element i have a list of images, but every image is over another!!!

here the code i used to do it:

<asp:DataList ID="DL_Immagini" runat="server" DataSourceID="Sql_IMG" HorizontalAlign="Left" RepeatColumns="10" RepeatDirection="Horizontal"> <ItemTemplate> <asp:HyperLink ID="HYP_IMG" runat="server" alt="gallery thumbnail" class="preview" ImageUrl='<%# Eval("NomeIMG") %>' NavigateUrl='<%# Eval("Ingrandimento") %>' target="_blank" Width="30" Height="30"></asp:HyperLink> </ItemTemplate> </asp:DataList>

i tried to set width and height, but i does not work
i tried also to remove CSS..but nothing

Dynamically generate image on image map or image button


Here is this thing which to me looks possible, but when I searched over
the net I couldnt find anything. Any ideas about this please do let me know.

I want to create a page where I can upload an image using any upload
function and then display it.
Now after diplaying it I want to select the hotspots for an image map.
The coordinates of image map values are stored in a database.

Basically I want that to create image maps and hotspots I dont use any
offline software, this work is successfully completed and working perfectly, but i want generate one identification where i click the hot spots position in image or CSS file Generate for user identifications, So how can i solve this problem,please Help me.

I hope You are clear in that what I am looking for.

Please do reply if you have any sugestions.

Thanks In Advance:



back ground image in css for a datalist



i have a datalist which i am using to display like tabs. I am using the css to set the background images for each tab. But for some reason the images do not come in the tabs. I am not sure why. please check the code below and let me know what i am doing wrong.

 the css:

    BORDER-RIGHT: gray 1px solid;
 BORDER-TOP: #B0reDE  1px solid;
 FONT-WEIGHT: normal;
 BORDER-LEFT: blue 1px solid;
 BORDER-BOTTOM: blue 1px solid;
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 10px;
 font-weight: bold;
 text-align: center;
 padding-top: 3px;
 padding-right: 9px;
 padding-bottom: 3px;
 padding-left: 9px;

the datalist code

<asp:DataList ID="tabs" RepeatDirection="Horizontal"  runat="server" CellPadding="0"
                CellSpacing="0" ItemStyle-CssClass="inactivetab" SelectedItemStyle-CssClass="activetab">

Datalist not displaying image from database


My database table contains the image file path which will be stored from a
file upload control.The image path in the table will be like "C:\Projects\projectname\projectfolder\Files\1_129308367798080000_images1.jpg"

I am trying to display that image through a datalist control as follows
<asp:DataList ID="cobrandlogolist" runat="server">
                <asp:Image id="CobrandLogo" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "CobrandLogo") %>' Height="100px" Width="100px"


and i am retrieving the image names from the db and assigning as datasource of this datalist in the load event as follows

    DataTable dt = new DataTable();

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend