从同一解决方案中的另一个项目调用webform

从同一解决方案中的另一个项目调用webform

本文介绍了从同一解决方案中的另一个项目调用webform的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在解决方案中有两个项目。

第一个项目叫做MainWeb,有一个表格Main.aspx

第二个项目名为Security,有一个表格RevisionHistory.aspx

如何从表格Main.aspx访问表格RevisionHistory.aspx



提前致谢



我尝试了什么:



我尝试过使用代码



Response.Redirect(/ Security / RevisionHistory.aspx)



和网页显示错误服务器错误在'/'应用程序。

I Have two projects with in a Solution.
The first project is called MainWeb and has a form Main.aspx
The Second project is called Security and has a form RevisionHistory.aspx
How do I access the form RevisionHistory.aspx from the form Main.aspx

Thanks in advance

What I have tried:

I have tried using the code

Response.Redirect("/Security/RevisionHistory.aspx")

and the web page shows the error Server Error in '/' Application.

推荐答案

Response.Redirect("http://localhost:49285/Contact.aspx", true);





但是在发布它时,你必须处理这个URL,所以从配置AppSetting中取出http:// localhost:49285 / this,根据你的QA设置它或者暂存或生产环境。



But while publishing it, you have to take care of this url, so take the "http://localhost:49285/ this from configuration AppSetting to set it as per your QA or staging or Production environment.


这篇关于从同一解决方案中的另一个项目调用webform的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 15:53