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 |
if we establish the cinnection with connection string tag in web.config file,can i go for encrypt and decrypt with that?
How to reduce the Page size in asp.net?
How long do session variables last?
Explain Optimization technique description?
What is the importence of the INTERFACE? but not the inheritence concept?and why we r declaring the empty methods in that? we can directly implements with in the class know? Tell me the importence?
Is it possible for me to change my aspx file extension to some other name?
Where we create sessions for Banking Applications and how to create? expalin with code?
What is the Difference between MVC And MVP design pattrens
Asp pages that worked pefectly on windows 2000 server and iis 5.0 do not work on windows 2003 server with iis 6.0. Asp.net pages work fine. Why?
How to transpose rows into columns and columns into rows in a multi-dimensional array ?
What?s the difference between Response.Write() andResponse.Output.Write()?
Contrast OOP and SOA. What are tenets of each ?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)