Click here to Skip to main content
15,900,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
here is an error

C#
void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
    HttpContext.Current.Response.Redirect("MerchantDashboard.cs");
}


What I have tried:

I am try to redirect the .cs file once the value is incorrect.
Posted
Updated 8-Sep-16 18:43pm
Comments
BillWoodruff 9-Sep-16 1:45am    
Please confirm you are talking about a Windows Forms project. Are you using a WebBrowser Control in this project: if not, why are you using a LinkLabel ?

Response.Redirect is used to redirect to another page in an ASP website - nothing like this works in Windows Forms.

Please refer below links .

c# - Response.Redirect Doesn't Work in my Windows Forms Application - Stack Overflow[^]

http://www.codeproject.com/Questions/83350/Redirect-from-one-form-to-another-form[^]
 
Share this answer
 
No, You cannot

if the MerchantDashboard is a form then you shall navigate/open it using

C#
MerchantDashboard obj = new MerchantDashboard();
          obj.Show();
 
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