Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain difference between friend and protected friend?

876


How many web config files can be created for an application?

797


Explain the difference between asp and asp.net?

948


What is asp net_sessionid?

1049


Can I tap into other windows livetm services?

933


What is State Management in .Net and how many ways are there to maintain a state in .Net? What is view state?

997


What is the life cycle of web page?

912


In ViewState How much lifespan items stored?

1013


Can user control be stored in library?

843


How to deploy/publish webservices?How many ways?Plz explain me

2230


Describe the master page.

912


What is the request flow used for asp.net mvc framework? : asp.net mvc

928


What is asp according to you?

992


How to register exception filter globally?

963


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?

952