简体   繁体   中英

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

When I click on Submit button in my page, I have to get dropdownlist values and I have to send it to another page.

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

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. 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

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM