Friday, March 16, 2012

Modal webform not working...

Hi,
I have a problem with a webform I display as modal in my ASP.NET 2.0
application.
I am generating an Excel sheet on the server side when the user clicks
a button, although the user does not get the "open/save" dialog box.
The serverside code executes without problems.
When I remove the following line of client side code <base
target=3D_self></base>, the "open/save" dialog box is shown as it
should., although the page is posted to a new blank window...
Please help me with this problem.
Sincerely
/Hans Sixh=F6jHi,
I have sloved the problem. Instead of implementing the <base
target=3D_self></base> tag to get the modal webform to post to itself and
not a new window I have now changed into using an <iframe:
<iframe
src=3D"ExportToExcel.aspx?ClientID=3D<%=3DRequest.QueryString["ClientID"]%>=
&FromPeriod=3D1&ToPeriod=3D<%=3DRequest.QueryString["ToPeriod"]%>&BudgetYea=
r=3D<%=3DRequest.QueryString["BudgetYear"]%>"
name=3D"embeddedFrame" width=3D"100%" height=3D"100%" scrolling=3Dno />
This works perfectly and the serverside code executes and displays the
open/save dialog when i push the Excel document to the client.
The strange thing is why my original solution worked in ASP.NET 1.1 but
not in ASP.NET 2.0 - to this I have not found an answer.
Sincerely,
Hans Sixh=F6j

0 comments:

Post a Comment