Click here to Skip to main content
15,029,206 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Compiler Error Message: CS1061: 'ASP.registration_aspx' does not contain a definition for 'DropDownList1_SelectedIndexChanged1' and no extension method 'DropDownList1_SelectedIndexChanged1' accepting a first argument of type 'ASP.registration_aspx' could be found (are you missing a using directive or an assembly reference?)
thats the error i receive on my login registration form kindly help me to sort out the problem

What I have tried:

C#


yes several time but all in vain
Posted
Updated 9-Aug-20 4:25am
Comments
Perić Željko 9-Aug-20 4:42am
   
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs1061

Read the message: there is no method in your class that has that name and signature. Check you added it to the right file, and that it is both in the correct class inside that file, and that the signature is right.

Sorry, but we can't do that for you - we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
   
Comments
Member 14910143 9-Aug-20 3:36am
   
please am unable to exactly get the error ..have reconstructed but still gets the same error
OriginalGriff 9-Aug-20 4:09am
   
Show us the relevant code fragments - we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Use the "Improve question" widget to edit your question and provide better information.
If you have a dropdown like

<asp:DropDownList ID="DropDownList1" runat="server" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged1" />


then you need a method in your code-behind with the exact name as it appears in the OnSelectedIndexChanged attribute

protected void DropDownList1_SelectedIndexChanged1(object sender, EventArgs e)
{

}


Note there is a "1" at the end of your function name so make sure the aspx and code-behind match exactly. Also make sure the method is "protected" or "public", not "private" or left default like

void DropDownList1_SelectedIndexChanged1(object sender, EventArgs e)
{

}
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900