Click to See Complete Forum and Search --> : Error in Excel downloading


tirthpatel
September 17th, 2007, 03:07 AM
Bellow code is Progress bar it’s open properly but after fill dataset then open excel downloading popup that time this error occurred: Server cannot append header after HTTP headers have been sent .
Please give me solution.
Private Sub JavaScriptFunc()
Response.Write("<div id='mydiv' STYLE='FONT-WEIGHT: bold; FONT-SIZE: 11pt; LEFT: 320px; COLOR: blue; FONT-FAMILY: Verdana; POSITION: absolute; TOP: 140px; TEXT-ALIGN: center() ' >")
Response.Write("&nbsp;")
Response.Write("</div>")
Response.Write("<script> var mydiv = document.getElementById('mydiv'); mydiv.innerText = '';</script>")
Response.Write("<script language=javascript>")
Response.Write("var dots = 0;var dotmax = 10;function ShowWait()")
Response.Write("{var output; output = 'Generating Report. Please wait() ';dots++;if(dots>=dotmax)dots=1;")
Response.Write("for(var x = 0;x < dots;x++){output += '.';}mydiv.innerText = output;}")
Response.Write("function StartShowWait(){mydiv.style.visibility = 'visible';ShowWait();ShowWait();window.setInterval('ShowWait()',2);}")
Response.Write("StartShowWait();</script>")
Response.Flush()
End Sub