Skinning CommandField

J

JJ

I'm using Themes with asp.net 2.0 and i have a command field(in a gridview)
like this:

<asp:CommandField ButtonType=Image ShowDeleteButton= true
DeleteImageUrl="~/App_Themes/Theme1/Images/button-delete.gif"/>

My current Theme is "Theme1" but how about if i change the theme to any
other?. I have to change "deleteimageurl" too. How can i avoid this?.

JJ
 
J

JJ

I've tried using:

DeleteImageUrl='<%# "~/App_Themes/" + this.Page.Theme + "/images/" +
"button-delete.gif" %>'

But it won't allow me to do this with this type of control.

There must be some way of skinning this part of the Gridview..?

??
 
J

JJ

Didn't find any soluion to this, so I ended up changing the button control's
parameters (e.g. imageURL) in the 'onRowCreated' event, in the code behind
file.

JJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top