I have a Jquery dialog with an ASP listview control inside. Before showing the dialog the listview is already filled on Page_Load, but I want to change this. I want to fill the listview when a dropdownlist is changed in the .aspx page, which triggers a postback to databind the listview.
The problem I’m having now is, when I want the dialog to be shown with the listview inside, the listview is still showing show the data I’ve binded on Page_Load.
How can I show the up-to-date listview inside my dialog after a postback?
Code to fill listview:
string conString = System.Configuration.ConfigurationManager.ConnectionStrings["SQLCONN"].ToString();
SqlConnection conn = new SqlConnection(conString);
string cmdstr = "querystring";
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(cmdstr, conn);
da.Fill(ds, "PlanningWagen");
lvPlanningWagen.DataSource = ds;
lvPlanningWagen.DataBind();
The querystring is right. Depending on whats selected in the ddl, the right records are always filled in the dataset. I’ve checked that.
Thx
I solved the problem by placing the content of the jquery in an updatepanel.