Click here to Skip to main content
15,913,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai,

How can i avoid the postback when the dropdown is loading please help me.
i bind the data using database.i will try the cascading dropdown but its not bind the data.
Thankyou.
Posted
Updated 21-Feb-12 20:32pm
v2
Comments
Sarvesh Kumar Gupta 22-Feb-12 2:06am    
Please describe your problem, what you want to do?

Hi, bind your dropdown using below process:

C#
if(!isPostback)
{
BindDDL();
}


and write a function to bind ddl.

Don't forget to mark, if it is your solution. :-)
 
Share this answer
 
Comments
Sam Path 22-Feb-12 2:13am    
I want to use in Ajax :)
Hi,
set the AutoPostBack property of DropDownList to false,

and in the page loading state you can handle the post back by this

C#
if(!this.Page.IsPostBack)
{
   // do ...
}


good luck
 
Share this answer
 
add code
if(IsPostBack==false)
{
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900