EditColumnCommand EditText-Icon with dynamic Path

Discussion in 'ASP General' started by Georg Fleischer, Mar 11, 2005.

  1. 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
     
    Georg Fleischer, Mar 11, 2005
    #1
    1. Advertising

  2. Hi Georg,

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

    Ray at work

    "Georg Fleischer" <> wrote in
    message news:...
    > 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
     
    Ray Costanzo [MVP], Mar 11, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miro Durcik

    app.rc resource's icon to .net Icon

    Miro Durcik, Oct 9, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,402
    Miro Durcik
    Oct 9, 2004
  2. Keith-Earl
    Replies:
    1
    Views:
    1,975
    Peter O'Reilly
    May 3, 2004
  3. =?Utf-8?B?R2VvcmcgRmxlaXNjaGVy?=

    EditColumnCommand EditText-Icon with dynamic Imagepath

    =?Utf-8?B?R2VvcmcgRmxlaXNjaGVy?=, Mar 13, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    382
    =?Utf-8?B?R2VvcmcgRmxlaXNjaGVy?=
    Mar 13, 2005
  4. Dan Polansky
    Replies:
    3
    Views:
    813
    Larry Barowski
    Feb 12, 2007
  5. Bodi
    Replies:
    1
    Views:
    290
    Lasse Reichstein Nielsen
    Nov 18, 2003
Loading...

Share This Page