.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

can any one clear my error in DropDownList?

Posted By: teja     Posted Date: March 13, 2013    Points:5   Category :ASP.Net
Hi,I have dropdownlist in one page,in that page when i am executing this,am getting error as follows......
Compilation Error

An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message:
CS0123: No overload for 'DropDownList2_SelectedIndexChanged' matches delegate 'System.EventHandler'

Line 113:style="color: #006600; font-weight: 700" Text="Select The Domain"></asp:Label>
Line 114:<span class="style21"><strong>&nbsp;</strong></span>&nbsp;&nbsp;
Line 115:<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True"
Line 116: onselectedindexchanged="DropDownList2_SelectedIndexChanged">
Line 117:<asp:ListItem>--Select--</asp:ListItem>

Please can any one suggest me what should i do,because i tried it,but id didn't find whee should i change.

Author: Shweta             
Posted Date: March 13, 2013     Points: 20   

It seems like you do not have method DropDownList2_SelectedIndexChanged in your .vb or .cs page

remove this line onselectedindexchanged="DropDownList2_SelectedIndexChanged" from your .aspx page and wire the event again by double click on DropDownlist

Author: SailajaReddy             
Posted Date: March 14, 2013     Points: 20   

Hi teja,

check if DropDownList2_SelectedIndexChanged is taking object and EventAgrs parameters or not????

protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)

If still problem persists , post the code to resolve the issue:-)


Author: Deco             
Posted Date: March 17, 2013     Points: 20   

You have double clicked on the DropDownlist control and it has created a event handler

and then you have incidently deleted the code in your code behind. That's why it is expecting the code in compile time. Please double click on the DropDownlist again so that it would create the code in your page and you would get rid of this error.


Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend