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 function used for removing an event listener?
Differentiate the session object and application object?
What methods are fired during the page load? Init()
What is the difference between page-level caching and fragment caching?
In What Order Do The Events Of An Aspx Page Execute. As A Developer Is It Important To Undertsand These Events?
In which event are the controls fully loaded?
Explain culture and uiculture values.
How to use push notification?
Give a few examples of page life cycle events.
In Data grid the question is below quantity price total these are 3 fields available in data grid if you enter quantity the total has to update automatically.Price field is already filled completely
Is it possible to develop a single web application using ASP.NET webforms and ASP.MVC?
How many languages are supported by .NET at present time?
In order to get assembly info which namespace we should import?
What’s the difference between asp.net web forms and asp.net mvc?
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?