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

Is asp.net and .net the same?

1038


What are the advantages of Web API?

1108


If iam developing an application that must accomodate multiple security levels though secure login and my asp.net web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users?

1016


What is a web pool?

1113


Is there any alternative to avoid name collisions other then Namespaces?

1114


What are validator? Name the validation controls in asp.net? How do you disable them?

1034


What does it mean your session has timed out?

981


What are client activated objects and server activated objects?

961


If you are using two select queries and retrieving data. how do you access second query's result set using data reader?

5580


Can you use Web API with ASP.NET Web Form?

1147


What is the difference between a multi-layer and multi-tier applications?

1010


What is the difference between client-side and server-side validations in ASP.NET?

1172


if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....

2122


What do you mean by View State and what is its role?

1084


How do u declare static variable and how it is declared and what is its lifetime?

1028