我可以在C#中的windowsforms中重定向.cs文件吗? [英] Can I redirect .cs file in windowsforms in C#

查看:62
本文介绍了我可以在C#中的windowsforms中重定向.cs文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个错误



here is an error

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





我的尝试:



一旦值不正确,我会尝试重定向.cs文件。



What I have tried:

I am try to redirect the .cs file once the value is incorrect.

推荐答案

Response.Redirect用于重定向到另一个页面ASP网站 - 在Windows窗体中不适用于此。



请参考以下链接。



c# - Response.Redirect并不适用于我的Windows窗体应用程序 - 堆栈溢出 [ ^ ]



http://www.codeproject.com/Questions/83350/Redirect-from-one-form-to-another-form [ ^ ]
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[^]


不,你如果 MerchantDashboard 是一个表单,则不能支付


您将导航/打开它使用



No, You cannot

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

MerchantDashboard obj = new MerchantDashboard();
          obj.Show();


这篇关于我可以在C#中的windowsforms中重定向.cs文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆