Link to home
Start Free TrialLog in
Avatar of mannevenu
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
Avatar of Mick Barry
Mick Barry
Flag of Australia image

not sure I understand. can you post the code that is causing propblems
Please post the code which is causing you problem..
Avatar of mannevenu
mannevenu

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
 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();
 
    }

Open in new window

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
Avatar of mannevenu
mannevenu

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial