If(dropdownlist1.selectedIndexChanged==true)
{
//code
}
else
{
//code
}
I am getting error in If condition, so can u pls give me a
solution.
Answer Posted / gaurav k
SelectedIndexChanged is a event for the DropDown Control.
True is a bool type. We can not compare an event with bool
type like this. If we have to do somthing on the change of
the selection of an item, we can write the appropriate code
in the SelectedIndexChanged Event.
protected void DropDownList1_SelectedIndexChanged
(object sender, EventArgs e)
{
//Code
}
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
Explain client-side scripting?
What are the advantages of asp.net?
ASP.NET 2.0's new membership API used for creating and managing user account is exposed through which 2 clause?
Why is the standalone environment only useful during the development process?
How can we register exception filter from the action?
Is it possible to apply themes to an asp.net application? If yes, then how?
8. Why do you want to work here?
Give 2 examples for scenarios when routing is not applied?
Explain exception filters?
How do active server pages work?
Tell me what is the request flow used for asp.net mvc framework? : asp.net mvc
Explain advantages of caching?
What is the caspol.exe tool used for?
What role “#&&” plays in a querysting?
Explain managed code an un-managed code.