Link to home
Start Free TrialLog in
Avatar of PagodNaUtak
PagodNaUtakFlag for Philippines

asked on

Change the image of boundfield buttontype="image"

I have the below code, how can I change the default image of the boundfield programmatically?
<columns>
               <asp:buttonfield buttontype="Image" commandname="Resume" ImageUrl="http://vmsd3jooc01/sites/applicantmanagement/PublishingImages/icons/attachmenticon.png" />
               </columns>

Open in new window

Avatar of w00te
w00te
Flag of United States of America image

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.buttonfield.imageurl.aspx
public virtual string ImageUrl { get; set; }
Just set:
your_object_name.ImageUrl = "yourimagestringgoeshere.jpg";
anywhere in your C# code that has access to that element.
-w00te
ASKER CERTIFIED SOLUTION
Avatar of PagodNaUtak
PagodNaUtak
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial