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 difference between friend and protected friend?
How many web config files can be created for an application?
Explain the difference between asp and asp.net?
What is asp net_sessionid?
Can I tap into other windows livetm services?
What is State Management in .Net and how many ways are there to maintain a state in .Net? What is view state?
What is the life cycle of web page?
In ViewState How much lifespan items stored?
Can user control be stored in library?
How to deploy/publish webservices?How many ways?Plz explain me
Describe the master page.
What is the request flow used for asp.net mvc framework? : asp.net mvc
What is asp according to you?
How to register exception filter globally?
Can we have multiple worker process in an ASP.NET application? If so then how it has been handled by application? And who handles it?