Groups | Blog | Home
all groups > asp.net webcontrols > december 2005 >

asp.net webcontrols : Custom Buttons


martinharvey via DotNetMonster.com
12/6/2005 4:50:22 PM
I would really appreciate some help with two questions

1) I have some buttons that i created with dreamweaver and i want to use
these as asp.net buttons. Can anyone tell me how to do this
a ) outside and b) inside the datagrid

2) I want to click on an image in the datagrid and have the details displayed
as text under a photograph. If the details are coming from a database what is
the best thing to use here a) datagrid b) datalist c) image and string
builder

many thanks

martin

--
Message posted via DotNetMonster.com
Nathan Sokalski
12/14/2005 9:00:48 PM
For question #1, the answer is simply to use the
System.Web.UI.WebControls.ImageButton control. It is basically the same as a
regular button, except you use an image rather than text. You can do all the
same stuff and any code in the eventhandler should be the same.

As for question #2, any of those would work. If you are already using a
datagrid, I would just keep using that. I would like to point out, although
I am sure you would discover it very quickly from what I said in your first
question, even though the name "ImageButton" sounds like it has the
button-like border, it is actually just a clickable image, so you probably
want to use that in #2 rather than just an image if it will be causing text
to appear.

Good Luck!
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/

[quoted text, click to view]

AddThis Social Bookmark Button