[英]An unhandled exception was generated during the execution of the current web request
Below is my code 下面是我的代码
IMG http://imageshack.us/a/img812/7017/98qq.jpg IMG http://imageshack.us/a/img812/7017/98qq.jpg
When I click on Submit button in my page, I have to get dropdownlist values and I have to send it to another page. 当我单击页面中的Submit按钮时,我必须获取dropdownlist值,并且必须将其发送到另一个页面。
I have followed following link ! 我已关注以下链接 ! for that 为了那个原因
When I try to run my code I am getting error as 当我尝试运行我的代码时,出现错误
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack trace: 堆栈跟踪:
IMG http://imageshack.us/a/img534/9554/opdu.jpg IMG http://imageshack.us/a/img534/9554/opdu.jpg
Can someone please tell me what is the error 有人可以告诉我这是什么错误吗
In my case, I created a new project and when I ran it the first time, it gave me the following error: 就我而言,我创建了一个新项目,当我第一次运行它时,它给了我以下错误:
An unhandled exception was generated during the execution of the current web request. 当前Web请求的执行期间生成了未处理的异常。 Information regarding the origin and location of the exception can be identified using the exception stack trace below. 可以使用下面的异常堆栈跟踪来标识有关异常的来源和位置的信息。
So my solution was to go to the Package Manager Console inside the Visual Studio and run: Update-Package 所以我的解决方案是转到Visual Studio内的Package Manager控制台并运行: Update-Package
Problem solved!! 问题解决了!!
You have more than one form tags with runat="server" on your template, most probably you have one in your master page, remove one on your aspx page, it is not needed if already have form in master page file which is surrounding your content place holders. 您的模板上有多个带有runat =“ server”的表单标签,最有可能您的母版页中有一个,在aspx页面上删除了一个,如果您的母版页文件中已经有表单,则不需要内容占位符。
Try to remove that tag: 尝试删除该标签:
<form id="formID" runat="server">
and of course closing tag: 当然还有结束标记:
</form>
As far as I understand, you have more than one form tag in your web page that causes the problem. 据我了解,您的网页中有多个导致问题的表单标签。 Make sure you have only one server-side form tag for each page. 确保每个页面只有一个服务器端表单标签。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.