If(dropdownlist1.selectedIndexChanged==true)
{
//code
}
else
{
//code
}
I am getting error in If condition, so can u pls give me a
solution.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / prashant yadav
selectedIndexChanged is a event while true is bool type
variable which is not corrct
Is This Answer Correct ? | 10 Yes | 0 No |
if we try to set the dropdownlist1 autopostback to true. we
will not get the error
Is This Answer Correct ? | 2 Yes | 3 No |
Answer / milind
If(dropdownlist1.selectedIndexChanged!=0)
Try this 1 you will not get error
Is This Answer Correct ? | 1 Yes | 2 No |
What is http response header?
What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?
What is custom attribute? How to create?
1.how to encrpt query string in asp.net? 2.there are 10000 records then i wnat display 5000 records one gridview and 5000 records another grid view what is the process?
What is the difference between Trace and Debug?
Define the steps to set up validation control.
What is the difference between the asp and asp.net?
What is deff. saop and disco?
How many types of validation are there?
can i use two web.config files of ConnectionString in One Default.aspx page
6 Answers Satyam, Verinon Technology Solutions, Wipro,
Explain the namespace classes used in asp.net mvc? : asp.net mvc
What is a global postback url?