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 |
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 meant by server side scripting?
Can we Run the Application without Build
Define the types of configuration files.
When does the application ONEND event handler fire?
1 Answers C Squared Systems, Verinon Technology Solutions,
What is the method used to load generated dataset with data on the DataAdapter control ?
What are the steps to follow to host a web application on a web server?
In my code i have 3 tables,i have to insert 3 tables data using single insert query so that i wrote transations in a sp.but what my problem is,in those 3 tables i have to include my empId from another table.when i'm passing values im getting error at this EmpId. how can i solve this error to execute insert query? plesae tell me the solution...
What is the life cycle of web page?
How do you handle session management in ASP.NET and How do you implement them. How do you handle in case of SQLServer mode?
How many types of page.
5 Answers TCS, Verinon Technology Solutions,
Can we use MSSql as backend in asp.net...if yes then How.?
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)