Subject: Help~~!How to set the path £¿
Posted By: bdbox Post Date: 12/12/2006 11:40:10 PM
I write asp.net code like this:
...
<tr>
 <td>
   <a href="<%=Request.ApplicationPath%>/Web/GetPass.aspx" class="text2">
   <font color="DarkOrange">Forget Password</font>
 </a>
 </td>
 <td align="center" colSpan="2">
 <P align="left"><asp:imagebutton id="SigninBtn" runat="server" ImageUrl = "~/images/szkm_31.gif"></asp:imagebutton>
 </P>
 </td>
</tr>

But when i use:
"ImageUrl = "<%=Request.ApplicationPath%>/images/szkm_31.gif" "instead of "ImageUrl = "~/images/szkm_31.gif" ",it show error.

i don't know why?

And The HTML code of picture like this
""UserControl/UserLogin/<%=Request.ApplicationPath%>/images/szkm_31.gif"" after i changed my code.

thanks.


Reply By: mike_remember Reply Date: 12/13/2006 9:34:07 AM
Hi

Use Page.ResolveUrl("~/images/szkm_31.gif") instead, this will work for you.

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.
Reply By: bdbox Reply Date: 12/13/2006 11:19:24 PM
i know it .but i want to know why i cann't use "ImageUrl = "<%=Request.ApplicationPath%>/images/szkm_31.gif" "?

thanks!


Go to topic 52380

Return to index page 94
Return to index page 93
Return to index page 92
Return to index page 91
Return to index page 90
Return to index page 89
Return to index page 88
Return to index page 87
Return to index page 86
Return to index page 85