Last post Jul 01, 2008 01:55 PM by itsumapathyk
Jul 01, 2008 01:05 PM|yoswel|LINK
Is there an equivalent of the Windows Forms Application.DoEvents() method in ASP.net?
Please help me ASAP.
ASP .net 1.1 c# VB
Jul 01, 2008 01:18 PM|Curt_C|LINK
for what purpose? You aren't going to be able to interact in the same way. All the server processing needs to complete before you can interact (and postback) again....
Jul 01, 2008 01:48 PM|yoswel|LINK
I have a big report which I want to export to excel in 5 parts using C# code and let the user save each part separately.
I am trying to open five different tabs to view the five parts as in the following.
for (int i = 2001; i <= 2005; i++)
string url = "MyReportViewerForm.aspx?StartYear=" + i + "&EndYear=" + i;
StringBuilder sb = new StringBuilder();
sb.Append("window.open('" + url + "','_blank'");
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "OpenInNewWindow" + i.ToString(), sb.ToString(), false);
The last line of code, which opens a new tab and displays "MyReportViewerForm.aspx", is run 5 times before the code in "MyReportViewerForm.aspx.cs" starts running.
The problem is the code in "MyReportViewerForm.aspx.cs" runs once instead of 5 times. Hence only one tab displays the first part of the report in Excel while the rest 4 tabs display an error message.
=================== Code in "MyReportViewerForm.aspx.cs" ========
Warning warnings = null;
string streamids = null;
string mimeType = null;
string encoding = null;
string extension = null;
byte bytes = ReportViewer1.LocalReport.Render("Excel", null, out mimeType, out encoding, out extension, out streamids, out warnings);
Response.Buffer = true;
Response.ContentType = mimeType;
Response.AddHeader("content-disposition", "attachment; filename=Sample." + extension);
I have created the report using Reporting Services in Visual Studio.
Jul 01, 2008 01:55 PM|itsumapathyk|LINK
look at the following link, u may find the answer