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=_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 SixhjHi,

I have sloved the problem. Instead of implementing the <base
target=_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="ExportToExcel.aspx?ClientID=<%=Request.QueryString["ClientID"]%>&FromPeriod=1&ToPeriod=<%=Request.QueryString["ToPeriod"]%>&BudgetYear=<%=Request.QueryString["BudgetYear"]%>"
name="embeddedFrame" width="100%" height="100%" scrolling=no /
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 Sixhj

0 comments:

Post a Comment