mannevenu
asked on
Regarding update panel
Hi sir, this is venu manne .if i use update panel response .write() is not working in any browser so can u plz give any alternative for this problem ..hope quick reply from u its little bit urgent
thanks in advance
venu manne
thanks in advance
venu manne
not sure I understand. can you post the code that is causing propblems
Please post the code which is causing you problem..
ASKER
YA SURE
i am sending u the code which causing me problem
tihs code is for sneding page to excel becz of update panel it is showing parser error
i am sending u the code which causing me problem
tihs code is for sneding page to excel becz of update panel it is showing parser error
public static void Convert1(DataSet ds, HttpResponse Response)
{
Response.Clear();
Response.AddHeader("content-disposition", "attachment; filename=mp1.xls");
Response.Charset = "";
//Response.ContentType = "application/vnd.ms-excel";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new System.Web.UI.HtmlTextWriter(stringWrite);
System.Web.UI.WebControls.DataGrid dg = new System.Web.UI.WebControls.DataGrid();
dg.DataSource = ds.Tables[0];
dg.DataBind();
dg.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();
}
If ur datagrid is in the updatepanel, then it create problem. Lets do one thing, take a label outside updatepanel and try to write that text u use in Response.Write. Is it working?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.