Script manager not calling with HttpContext
When i use
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "TTTT111", "alert('calling dfdfd from server .....');", true);
before or after
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ContentType = strContentType;
HttpContext.Current.Response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}", strFileName));
HttpContext.Current.Response.OutputStream.Write(ExportDataString, 0, ExportDataString.Length);
HttpContext.Current.ApplicationInstance.CompleteRequest();
HttpContext.Current.Response.OutputS开发者_如何学Pythontream.Flush();
then it does not call scriptmanager.
The Content-Disposition
will prompt the user to save the content to disk. It doesn't look like you are rendering the page here. Just writing ExportDataString
to the stream.
What is it you are expecting to happen?
精彩评论