When the user asks http://localhost/WebApp1/Default.aspx, it txtApplicationPath.Textshould be assigned "/WebApp1", but it txtAbsolutePath.Textshould be assigned "http://localhost/WebApp1/Default.aspx", but instead both text fields display blank lines.
Why?
Default.aspx:
<asp:TextBox ID="txtApplicationPath" runat="server"
Text='<%# HttpContext.Current.Request.ApplicationPath %>'>
</asp:TextBox> <br />
<asp:TextBox ID="txtAbsolutePath" runat="server"
Text='<%# HttpContext.Current.Request.Url.AbsolutePath %>'>
</asp:TextBox>
Thank you
source
share