[c#] 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

This question is related to c# asp.net

The answer is


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


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.