Home All Groups Group Topic Archive Search About

EditColumnCommand EditText-Icon with dynamic Path



Author
11 Mar 2005 10:27 AM
Georg Fleischer
Hello,

I have the following problem. I need to insert my global image-path to an
icon the EditText Property of my <asp:DataGrid> control.

<asp:EditCommandColumn ButtonType="LinkButton"
UpdateText='<%=ImgSrc_Update%>' CancelText='<%=ImgSrc_Cancel%>'
EditText='<%=ImgSrc_Edit%>'>

The problem is, that the <%= %> statements are not evaluated.
If I use the statement as a normal Image-Tag, everything works fine.

These are the definition statements for the variables:

ImgSrc_Edit = "<img src='" + ConfigurationSettings.AppSettings["PATH_IMG"] +
"/buttons/button_edit.gif' alt=''>";
ImgSrc_Update = "<img src='" + ConfigurationSettings.AppSettings["PATH_IMG"]
+ "/buttons/button_ok.gif' alt=''>";
ImgSrc_Cancel = "<img src='" + ConfigurationSettings.AppSettings["PATH_IMG"]
+ "/buttons/button_cancel.gif' alt=''>";

Has anybody got an idea how to solve this problem?

MfG
Georg Fleischer

Author
11 Mar 2005 7:31 PM
Ray Costanzo [MVP]
Hi Georg,

This is a classic ASP group.  The ASP.NET groups have "aspnet" in their
names.

Ray at work

Show quote
"Georg Fleischer" <GeorgFleisc***@discussions.microsoft.com> wrote in
message news:8BF7CED0-B7A0-47E6-BA85-FBE3F612521E@microsoft.com...
> Hello,
>
> I have the following problem. I need to insert my global image-path to an
> icon the EditText Property of my <asp:DataGrid> control.
>
> <asp:EditCommandColumn ButtonType="LinkButton"
> UpdateText='<%=ImgSrc_Update%>' CancelText='<%=ImgSrc_Cancel%>'
> EditText='<%=ImgSrc_Edit%>'>
>
> The problem is, that the <%= %> statements are not evaluated.
> If I use the statement as a normal Image-Tag, everything works fine.
>
> These are the definition statements for the variables:
>
> ImgSrc_Edit = "<img src='" + ConfigurationSettings.AppSettings["PATH_IMG"]
+
> "/buttons/button_edit.gif' alt=''>";
> ImgSrc_Update = "<img src='" +
ConfigurationSettings.AppSettings["PATH_IMG"]
> + "/buttons/button_ok.gif' alt=''>";
> ImgSrc_Cancel = "<img src='" +
ConfigurationSettings.AppSettings["PATH_IMG"]
Show quote
> + "/buttons/button_cancel.gif' alt=''>";
>
> Has anybody got an idea how to solve this problem?
>
> MfG
> Georg Fleischer

AddThis Social Bookmark Button