imagebutton

Getting row index from an ImageButton click in a GridView

I have a Gridview with ImageButtons added to a column via a templatefield. I've attached a function to the "OnClick" event. Once in this function, how can I get the index of the row that has the button that has been clicked. It appears that all I have is the mouse coordinates on the page. ...

How do I get an imagebutton ID in C#?

Hi, I know I can get an imagebutton's X&Y, but how do I get it's ID? I'd like to start by printing it to a label at first. later I would like to use it in a switch case - any different case would change the imagebutton.imageurl to a different image, but speicifically do it for the imagebutton I just clicked on. I tried Label1.Text = C...

lightbox effect/control for C# with ASP.NET

Update:OK about ThickBox, I found the version that supports button but I get a message saying "Operation could not be completed" when I try to use the controls and add them in design mode. Not sure what else to do :( Any idea why I get this message? I already found the Ajax Control Toolkit, but I can't install it for some reason (with...

Android - different image for rollover on ImageButton

Hi Is it possible to specify a different image when the user's focus comes to an ImageButton? I want to display an image button on a LinearLayout and change the image when the user's focus comes on the button or when the user presses the button. Thanks. ...

Android ImageButton -- can't get image in the center

I want to create an Android ImageButton in the xml file with a background image, and a smaller icon on top of that, right in the center. For some reason, it's not obvious how to do it, and documentation is no help. <ImageButton android:id="@+id/sound_button" android:layout_x="430px" android:layout_y="219px" android:layout_width="48px" a...

Prevent asp:ImageButton Default inline Style

Unfortunately the asp:ImageButton control renders an inline style attribute of "border-width:0px;" This is frustrating for a variety of reasons. In the past I have worked around the problem by creating my own custom image button control which doesn't render the inline style attribute. I am looking for a more elegant solution to the probl...

ASP.net Delphi dynamic imagebutton onclick event

I'm having a bit of trouble with an old delphi.net application. I need to show some thumbnail images on a specific location on the page, and when the user clicks the image show the image. The images are rather small so I havn't bothered with thumbnail generation. The problem is that I can't get the onclick event working. Here is m...

What's the best way of displaying thumbnails in ASP.NET?

I'm creating a regular gallery in ASP.NET but I have little experiences with creation of thumbnails. I know the algorithms and the GetThumbnailImage method, but my problem is somewhere else - I'm currently displaying the images (just resized) using the ImageButton control. And that's the point - I have no idea how to hook up the "thumbna...

asp:ImageButton not firing onclick event

I have a page that uses a master page, several RequiredFieldValidators, and the Web Toolkit autocomplete extender. The following code only shows the bare minimum of the page: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" MasterPageFile="~/master.master" Inherits="Login" %> <asp:Content id="...

Get Id of a row from an image button in a gridview in vb.net

I have a gridview and in that gridview i created a list of imagebuttons programmatically with an addhandler as follows: Dim deletecshr As New ImageButton deletecshr.ImageUrl = "\images\bttnDeletemini.gif" deletecshr.ToolTip = "This Will Delete All Cashiers" AddHandler deletecshr.Click, AddressOf deletecshr_Click deletecshr.Attributes.Ad...

How to get a handle to a dynamic imagebutton in an ajax panel postback

I write an imagebutton to a table cell in a new row when a user selects an item in a list: ImageButton imgbtnRemove = new ImageButton(); imgbtnRemove.ID = "uxStandardLetterDeleteImage_" + items.letterName; imgbtnRemove.CommandName = "uxStandardLetterDeleteImage_" + items.letterName; imgbtnRemove.ImageUrl = items.remove; imgStatus.Altern...

all of a sudden...dynamic created imagebutton's click event wont fire.

hi i have a page that dynamic create a table of contacts, if the contact got an email i also create an image button with a click event. i have a similar function in the rest of the page that works perfectly. and i used this before without any problems. protected void CreateContactsList(IQueryable<AA_BranschFinder.Login.vyWebKontaktpers...

Wpf ImageButtons?

Hello! I created a WPF application that has many buttons. Now the customer wants to change all the buttons to icons. For example: All the OK buttons should have the same icon, all the cancel btns and so on. I want to put in all the buttons Style="{StaticResource ButtonStyle_OK}", Style="{StaticResource ButtonStyle_OK}" etc. Now my qu...

ImageButton and GridView problem - invalid postback

I currently have a Gridview which uses a ButtonField of type image and this works. However I want to be able to use the ConfirmButtonExtender that is part of the AjaxControlToolkit which cannot operate on a Buttonfield so I decided to place an ImageButton inside a TemplateField however whenever I click the button I recieve an Invalid po...

Can't seem to capture a button click in a gridview in asp.net

I put some Image Buttons into my gridview, but I cannot capture the click event. Neither creating a click event, nor creating an OnRowCommand handler in the gridview works. Clicking the buttons simply postbacks to the current page. I add my buttons like this: protected void gridview1_RowDataBound(object sender, GridViewRowEventArgs e)...

Getting ASP.NET ImageButton OnClientClick changes to the server

I use an ASP.NET ImageButton on my website. When a user clicks on the ImageButton, a javascript is fired via the OnClientClick event. The script changes the ImageUrl of the ImageButton. On the same page, I have a submit button. Clicking the button causes a post back to appear. Is there a way of knowing the correct ImageUrl of the Ima...

How to disable submit behaviour of asp:ImageButton?

I have a image button in a page which can be triggered on mouse click, by default it gets triggered on enter press also which i want to disable. I know about "UseSubmitBehaviour" attribute in asp:Button, is there a way to do the same in asp:ImageButton? ...

ImageButton not working?

I have master page and my other pages like index, category etc in the same folder (root), and the root folder also has _images folder and _includes folder that contains some ascx controls. Now, the images seem to be working fine for "img" tags, but it's working very oddly for ImageButtons. Apart from index page, it is usually unable to...

Download file on ImageButton Click event

I have a link of a file, and I don't know how to add it to imagebutton. I want to see the 'open-save-cancel' , screen when imagebutton is clicked, but imagebutton doesn't seems to be taking the link of file as a file, but taking it as a page url and tring to open the file url as page. Thanks ...

ImageButton not hitting codebind method, but does if replaced with LinkButton

I have an ImageButton being build inside of radgridview columnn. It is defined as follows. <asp:ImageButton ID="ImageButton_DeleteRun" ImageUrl="~/Assets/Images/Misc/delete.png" runat="server" OnClick="QueryDelete" CommandName="QueryDelete" CommandArgument='<%# DataBinder.Eval(Container,"DataItem.QueryGuid") %>' Width="10" Height="10" ...