This is a discussion on Is it possible to use a dynamic image button in datagrid control? within the C# Programming forums, part of the Software Development category; I have a SqlDataSource that returns name, state and key. I have a gridview control that I want to have ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| I have a SqlDataSource that returns name, state and key. I have a gridview control that I want to have 3 columns. Column 1 & 2 are bound with the datafield and third column to display imagebutton. . The possible images for the button are stored in a web directory so I would need to set the button ImageUrl to http://+ key from datasource + .jpg from the C# code behind ?
__________________ Shaalini.S ![]() Be the Best of Whatever you are... Last edited by shaalini : 01-29-2008 at 09:24 PM. |
| Sponsored Links |
| |||
| Hi, I dont think that there is necessity to add the image button in the GridView dynamically because the third column is anyway going to be a column with image buttons right? Only thing is you are going to bind the image source dynamically.And you can do that by <asp:ImageButton ID='lblButton' ImageUrl='<%# Eval("url") %>' runat="server" /> The value url must be assigned from the server side.
__________________ Sathish Kumar.R ![]() Knowledge is meant to SHARE Last edited by Sathish Kumar : 03-10-2008 at 12:14 AM. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Showing the Image file thumbnail view in ListView control using VC++ 6.0 | prabhat.singh | C and C++ Programming | 0 | 01-17-2008 10:53 PM |
| How to create an image from panel background Image | S.Vinothkumar | C# Programming | 1 | 10-22-2007 03:52 AM |
| use of Custom Control and User Control? | a.deeban | ASP and ASP.NET Programming | 1 | 08-20-2007 08:25 AM |
| I am having checkbox in datagrid and treeview, while click the button i need to check | kingmaker | C# Programming | 3 | 08-14-2007 09:39 AM |
| Can I make a button on my page work as the browser's Back button in javascript? | kingmaker | HTML, CSS and Javascript Coding Techniques | 1 | 07-26-2007 01:27 AM |