473,387 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

File Download from window.ShowModalDialog

Hello,

Using asp.net 2.0, C# and IE7

I'm using window.showModalDialog to open a modal window on the client from
Javascript.
I have to include this line in the < HEAD html of the modal window:
<base target=_selfbecause whenever that page posted back, it would spawn
off a new window!! This is the beaviour in IE7.

In this Modal Window I need to have a File Download functionality.
The problem is that using <base target=_selfthe File Download dialog don't
popup, but if I remove the <base target=_selfthe File Download dialog
appears but it would spawn off a new window from the Modal Dialog.

Thanks for any suggestions on how to resolve this issue

Joao Rego
Oct 23 '07 #1
4 4552
"Joao Rego" <Jo******@discussions.microsoft.comwrote in message
news:88**********************************@microsof t.com...
Using asp.net 2.0, C# and IE7

I'm using window.showModalDialog to open a modal window on the client from
Javascript.
I have to include this line in the < HEAD html of the modal window:
<base target=_selfbecause whenever that page posted back, it would spawn
off a new window!! This is the behaviour in IE7.
And in earlier versions...
In this Modal Window I need to have a File Download functionality.
The problem is that using <base target=_selfthe File Download dialog
don't
popup, but if I remove the <base target=_selfthe File Download dialog
appears but it would spawn off a new window from the Modal Dialog.
That's correct.
Thanks for any suggestions on how to resolve this issue
The easiest method is simply not to use showModalDialog - it's completely
non-standard, and only works in IE and some versions of Safari...

Why do you need to use showModalDialog anyway...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 23 '07 #2
Hi Mark Rae,

Thanks for the advice but I'm mimic a WindowsApp to WebApp, so I have to
create the UI as close as possible.

In respect to this problem I work around it creating a dummy dialog that
only writes out an iframe with src = the dialog i want to load.

thanks,

joao rego

Oct 23 '07 #3
"Joao Rego" <Jo******@discussions.microsoft.comwrote in message
news:14**********************************@microsof t.com...
Thanks for the advice but I'm mimic a WindowsApp to WebApp, so I have to
create the UI as close as possible.
WinForms and WebForms are fundamentally different - I wouldn't advise this
approach at all...
In respect to this problem I work around it creating a dummy dialog that
only writes out an iframe with src = the dialog i want to load.
Modal dialogs are fairly easy to simulate with <divcontrols:
http://www.hell.org.ua/Docs/oreilly/...6-sect-10.html
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 23 '07 #4
Thanks for this new approach, I tried the sample and it has the behaviour
very similar to the window.ShowModalDialog(...), since this is more standard
I guess I'll have to change all my ModalDialogs.
Thanks again for your help
"Mark Rae [MVP]" wrote:
"Joao Rego" <Jo******@discussions.microsoft.comwrote in message
news:14**********************************@microsof t.com...
Thanks for the advice but I'm mimic a WindowsApp to WebApp, so I have to
create the UI as close as possible.

WinForms and WebForms are fundamentally different - I wouldn't advise this
approach at all...
In respect to this problem I work around it creating a dummy dialog that
only writes out an iframe with src = the dialog i want to load.

Modal dialogs are fairly easy to simulate with <divcontrols:
http://www.hell.org.ua/Docs/oreilly/...6-sect-10.html
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 23 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gilles T. | last post by:
Hi! I have a popup window open with the showModalDialog function: window.showModalDialog('dialog.aspx',window,"status:no; resizable:yes; dialogWidth:900px; dialogHeight: 700px;"); and in...
1
by: MSDN Account | last post by:
We have web site that used the IIS ResKit tool MSWC.PermissionChecker to check file permissions. The web site has been upgraded and that upgrade included changing the default server side language...
2
by: Simon Storr | last post by:
Is it possible to make the parent window refresh when a modal dialog is closed? I know I can use window.opener.location.reload(true); for a 'normal' window, but this doesn't work for...
6
by: Scott Lee | last post by:
I am displaying an ASP.Net generated form in a popup opened with window.showModalDialog. The form contains DropDownList controls. The first ddl is populated via databinding to a datatable, has...
3
by: Paul K | last post by:
I'm not quite sure if the problem I'm having is a restriction of showModalDialog or if there is a way around it. The web app I am working requires the user to select a record from a list. I pop...
2
by: Sarah | last post by:
I am using the javascript showModalDialog function to open a file upload window. The function opens a page which contains a usercontrol housing the file upload stuff. The control works fine when...
9
by: Stan B | last post by:
I create a popup window by calling window.showModalDialog Popup window has Ok button with this code attached: === string Script = "<script language=JavaScript>" + "{" + "window.close();" +...
0
by: sunita | last post by:
Hiiii I am opening an aspx page in a showModalDialog...I have and i frame in that popup whose target is another page.. And this is what takes place in that aspx page that is in the iframe...I am...
1
by: elizayiu | last post by:
Hi, I need to write a webpage which does the following: - open up a window and pass parameters into it (i.e. need to call showModalDialog() or showModelessDialog()) - contains jscript to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.