473,606 Members | 2,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

File Download from window.ShowModa lDialog

Hello,

Using asp.net 2.0, C# and IE7

I'm using window.showModa lDialog 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=_selfbec ause 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 4561
"Joao Rego" <Jo******@discu ssions.microsof t.comwrote in message
news:88******** *************** ***********@mic rosoft.com...
Using asp.net 2.0, C# and IE7

I'm using window.showModa lDialog 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=_selfbec ause 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******@discu ssions.microsof t.comwrote in message
news:14******** *************** ***********@mic rosoft.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.ShowModa lDialog(...), 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******@discu ssions.microsof t.comwrote in message
news:14******** *************** ***********@mic rosoft.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
4148
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 dialog.aspx, I need to print the page with javascript function window.print but this function don't work with the showModalDialog window. Why?
1
3318
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 from VBScript to C# (*.vbs --> *.cs). Does C# have a native method for doing what MSWC.PermissionChecker used to do? If so has anyone gone through converting the MSWC.PermissionChecker method to C# and would they share what they did? If not...
2
16122
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 showModalDialog. It is modal as far as the client is concerned but not the server... In my app I have a datagrid on the main aspx page, I pop up a modal dialog to edit a record. On closing the modal dialog I'd like to refresh the
6
5396
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 its AutoPostBack set to true and has its SelectedIndexChanged event being handled in codebehind. The event fires as it should populating two more ddls. The problem is, the two ddls appear empty. I have used a javascript alert to look at the...
3
7219
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 this list (generated by a second page) in a second window. When the user selects a record on the datagrid, I close the second window and submit the calling page. If I try to use showModalDialog, the dialog pops up just fine and everything is...
2
2991
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 tested independently, but when called through showModalDialog on submit, another window is opened (a fullsize version of the page passed to showModalDialog). Is this a bug, by design, or have I made some sort of error? thanks
9
4652
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();" + "}" + "</script>";
0
1329
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 opening a excel sheet in it..I open a file download dialog which says open or save....When i click on save everything works fine and am able to save the file..but when i click on open...The excel file opens in the page and the modalDialog closes...
1
2709
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 support drag and drop objects from itself to the popup window - wait for user response in popup window and return results back to the parent window (i.e. calling showModalDialog() is preferred)
0
8016
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7955
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8431
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8306
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6773
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5466
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3980
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2448
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1557
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.