Click here to Skip to main content
16,012,044 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have two update panels .In one update panel i have one link button & in other update panel i have datalist.When i click on link button of update panel one the how to bind the datalist on button click event.
Posted

Call __dopostback('updatepanel2','') for second update panel.

This will cause a partial postback to second updatepanel and in load event of page you can bind the control.

Hope this wud help :)
 
Share this answer
 
Comments
prathamesh812 19-Mar-13 6:17am    
I am new in progrmming so how can i call this
Hi!!! due to update panel i think postback of button is stuck... but you can bind datalist here the code ,,,,

C#
public void btn_click()
  {

      da = new SqlDataAdapter("select ItemCode,ItemDesc, ItemCode + '-0.jpg' as PicFileName, convert(char, MRP,1) as MRP, convert(char,OfferPrice,1) as OfferPrice, DiscountPercent from Items", con);
      dt = new DataTable();

      da.Fill(dt);

      DataList1.DataSource = dt;
      DataList1.DataBind();
  }
 
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