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
What is the difference between the response.write() and response.output.write() methods?
Define what is razor? : asp.net mvc
Which control has default post back is enabled(true)?
What is a reflection?
What are the uses of reflection?
Differentiate between early binding and late binding.
What is advantage of asp.net?
How do I open an ashx file in windows 7?
How will you do Redo and Undo in a TextControl?
What are the main advantages of using asp.net?
What is the use of response redirect in asp.net?
In early binding will the method invoked on com component will verify it?s existance in the system or not ?
Define the term Web Garden?
What is the difference between globalization and localization?
how can create login from create and written conde in asp.net