Click here to Skip to main content
15,910,277 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

please, can anyone help me with this problem am facing in asp.net programming.

I have a login page(.aspx. from where i want to redirect to three different pages (Register1.aspx, register2.aspx and register3.aspx, using three different hyperlink labels. i coded the login.aspx to:

C#
protected void Page_Load(object sender, EventArgs e)
        {
            hlnkHMO.NavigateUrl = "Register1.aspx?ReturnUrl="; + HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"]);

            hlnkProvider.NavigateUrl = "RegisterProvider.aspx?ReturnUrl="; + HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"]);

            hlnkEnrollee.NavigateUrl = "RegisterEnrollee.aspx?ReturnUrl="; + HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"]);
        }


but i am getting this:


CSS
Server Error in '/'; Application.
Access is denied.
Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.

Error message 401.2.: Unauthorized: Logon failed due to server configuration.  Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server.  Contact the Web server's administrator for additional assistance.

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET 
Version:4.0.30319.272


please can anyone help out
Posted

1 solution

Hi,

1) visit with Full URL means URL + Page Name
2)
C#
hlnkHMO.NavigateUrl = "Register1.aspx?ReturnUrl="; + HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"]);

**There is + after the ; - must gives compilation error
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900