Rendering imageurl html

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeroen Klooster

    Rendering imageurl html

    Hi all!

    I'm having some trouble using user controls.

    Situation:

    An apsx page contains an user control (Control A) that contains
    another user control(Control B). Control B is located in the subfolder
    "Controls" and has some imagebutton server controls. I want to set the
    imageurl of these image controls directly into the html using:

    <code>

    <ASP:IMAGEBUTTO N runat="server" id="btnTest"
    imageurl='<%=Se ssion["imgprefix"]%>images/test.gif'/>

    </code>

    the html output from .NET :

    <code>

    <input type="image" name="ctrlA:ctr lB:btnTest"
    id="ctrlA_ctrlB _DownButton"
    src="Controls/<%=Session[&quot;imgPrefix &quot;]%>images/test.gif"
    align="Middle" border="0" />

    </code>

    Anybody has a clue why the src attribute is rendered like this?

    Thanks in advance,
    Jeroen
  • Freddy

    #2
    Re: Rendering imageurl html

    Have you checked whether your aspx page is asp compatable?

    Freddy


    "Jeroen Klooster" <jeroenklooster @hotmail.com> wrote in message
    news:77726f87.0 409130407.24789 c67@posting.goo gle.com...[color=blue]
    > Hi all!
    >
    > I'm having some trouble using user controls.
    >
    > Situation:
    >
    > An apsx page contains an user control (Control A) that contains
    > another user control(Control B). Control B is located in the subfolder
    > "Controls" and has some imagebutton server controls. I want to set the
    > imageurl of these image controls directly into the html using:
    >
    > <code>
    >
    > <ASP:IMAGEBUTTO N runat="server" id="btnTest"
    > imageurl='<%=Se ssion["imgprefix"]%>images/test.gif'/>
    >
    > </code>
    >
    > the html output from .NET :
    >
    > <code>
    >
    > <input type="image" name="ctrlA:ctr lB:btnTest"
    > id="ctrlA_ctrlB _DownButton"
    > src="Controls/<%=Session[&quot;imgPrefix &quot;]%>images/test.gif"
    > align="Middle" border="0" />
    >
    > </code>
    >
    > Anybody has a clue why the src attribute is rendered like this?
    >
    > Thanks in advance,
    > Jeroen[/color]


    Comment

    • bruce barker

      #3
      Re: Rendering imageurl html

      you can not <%= %> inside a control tag. use the more restrictive <%# %>


      -- bruce (sqlwork.com)


      "Jeroen Klooster" <jeroenklooster @hotmail.com> wrote in message
      news:77726f87.0 409130407.24789 c67@posting.goo gle.com...[color=blue]
      > Hi all!
      >
      > I'm having some trouble using user controls.
      >
      > Situation:
      >
      > An apsx page contains an user control (Control A) that contains
      > another user control(Control B). Control B is located in the subfolder
      > "Controls" and has some imagebutton server controls. I want to set the
      > imageurl of these image controls directly into the html using:
      >
      > <code>
      >
      > <ASP:IMAGEBUTTO N runat="server" id="btnTest"
      > imageurl='<%=Se ssion["imgprefix"]%>images/test.gif'/>
      >
      > </code>
      >
      > the html output from .NET :
      >
      > <code>
      >
      > <input type="image" name="ctrlA:ctr lB:btnTest"
      > id="ctrlA_ctrlB _DownButton"
      > src="Controls/<%=Session[&quot;imgPrefix &quot;]%>images/test.gif"
      > align="Middle" border="0" />
      >
      > </code>
      >
      > Anybody has a clue why the src attribute is rendered like this?
      >
      > Thanks in advance,
      > Jeroen[/color]


      Comment

      Working...