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 |
can u create two Primary key for a table? --Sivaa
If I have more than one version of one assemblies, then how will I use old version (how/where to specify version number?) In my application?
Can two web application share a session and application variable ?
5 Answers Satyam, V3 Engineers,
What is .netmodule and how is different from .dll and .exe
How you can stop the validation of ASP.NET controls from client side?
0 Answers Sans Pareil IT Services,
what is structured data format?
Can master pages be nested?
What is difference b/w Data Grid in ASP.Net 1.1 and Gridview in 2.0
What is the best Macanism to clear the Cache in asp.net
what is silverlight and what is the purpose of silverlight?
What is the benefit of WebAPI over WCF?
Suppose, I have 3 pages, Page1.aspx, Page2.aspx, Page3.aspx. All pages are in diff. server. When user req. for a page, Page1.aspx opens Ist & a session established. If user req. for IIn page, second session established. Similarly, 3rd session established if user req. 3rd page. In this scenario, tot. 03 sessions are established. How we can minimize it so that it will work with only one session?
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)