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 type of code, client-side or server-side, is found in a code-behind file of a Web page?
What are the different validators in asp.net?
What is a proxy in web service?
What is the Difference between MVC And MVP design pattrens
What is a ashx file?
Why session is more secure than cookies?
What is mvc in asp.net tutorial? : Asp.Net MVC
How do we access view state value of this page in the next page?
Where is the session stored?
Can you explain composite pattern?
What is the Impprsonation?and what is the importence of that?
Contrast oop and soa. What are tenets of each16. How does the xmlserializer work? What acl permissions does a process using it require?