473,618 Members | 3,044 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Modal form

What is a best way to create modal forms in ASP.NET?
Nov 18 '05 #1
4 1289
For IE, using window.showModa lDialog() will create a dialog that is modal to
that specific IE browser window.

Dale

"Mark Goldin" <ma********@com cast.net> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
What is a best way to create modal forms in ASP.NET?

Nov 18 '05 #2
How do I execute that code on a server side?
"DalePres" <don-t-spa-m-me@lea-ve-me-a-lone--.com> wrote in message
news:eT******** ******@tk2msftn gp13.phx.gbl...
For IE, using window.showModa lDialog() will create a dialog that is modal to that specific IE browser window.

Dale

"Mark Goldin" <ma********@com cast.net> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
What is a best way to create modal forms in ASP.NET?


Nov 18 '05 #3
You cannot execute that code from server side. Server code is not allowed to
open new IE window on the client (otherwise, the bad guys would make their
web site keep poping up new windows until the client computer crach). You do
it through client side script.

Say, you have a button (server control) on the page, on Pare_Load event
handler, you can attach client script like this:
btnOpenDialog.A ttribute.Add("o nclick","window .showModalDialo g('MyDialogPage .
html')");
Or
btnOpenDialog.A ttribute.Add("o nclick","OpenMy Dialog()");

Of course in latter case, you need to write a javascript functioncalled
OpenMyDialog() in the page's HTML source.

"Mark Goldin" <ma********@com cast.net> wrote in message
news:eU******** ******@TK2MSFTN GP12.phx.gbl...
How do I execute that code on a server side?
"DalePres" <don-t-spa-m-me@lea-ve-me-a-lone--.com> wrote in message
news:eT******** ******@tk2msftn gp13.phx.gbl...
For IE, using window.showModa lDialog() will create a dialog that is
modal to
that specific IE browser window.

Dale

"Mark Goldin" <ma********@com cast.net> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
What is a best way to create modal forms in ASP.NET?



Nov 18 '05 #4
<in the page's HTML source.
Can it be stored in JS file?

"Norman Yuan" <no******@telus .net> wrote in message
news:ZLeIc.1514 7$iw3.6019@clgr ps13...
You cannot execute that code from server side. Server code is not allowed to open new IE window on the client (otherwise, the bad guys would make their
web site keep poping up new windows until the client computer crach). You do it through client side script.

Say, you have a button (server control) on the page, on Pare_Load event
handler, you can attach client script like this:
btnOpenDialog.A ttribute.Add("o nclick","window .showModalDialo g('MyDialogPage . html')");
Or
btnOpenDialog.A ttribute.Add("o nclick","OpenMy Dialog()");

Of course in latter case, you need to write a javascript functioncalled
OpenMyDialog() in the page's HTML source.

"Mark Goldin" <ma********@com cast.net> wrote in message
news:eU******** ******@TK2MSFTN GP12.phx.gbl...
How do I execute that code on a server side?
"DalePres" <don-t-spa-m-me@lea-ve-me-a-lone--.com> wrote in message
news:eT******** ******@tk2msftn gp13.phx.gbl...
For IE, using window.showModa lDialog() will create a dialog that is

modal
to
that specific IE browser window.

Dale

"Mark Goldin" <ma********@com cast.net> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
> What is a best way to create modal forms in ASP.NET?
>
>



Nov 18 '05 #5

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

Similar topics

2
12244
by: martin de vroom | last post by:
Hi, I have a web page that opens a modal dialog (client side) in the following manner onclick="window.showModalDialog('/dialog.asp',null,'dialogHeight: 200px; dialogWidth: 400px; dialogTop: 300px; dialogLeft: 150px; edge: Sunken; center: Yes; help: No; resizable: No; status: No;');"> and the page loads in the modal dialog no problem.
2
3867
by: Matt | last post by:
I want to know how to submit the form data to a modal dialog window? The following is page1.asp, and when the user clicks submit button, it will post the form data to page2.asp by opening a new window. But I want modal dialog window, any ideas?? <form action="page2.asp" method="post" target="_blank"> <input type="text" name="username"> <input type="submit" name="submit"> </form>
4
8902
by: Kyralessa | last post by:
In Access 2000, I have a base form with a ListBox of conference registrants. In the form's declarations section I include Dim f as Form To add a registrant I'm doing this: Set f = New Form_frmSingleRegistrant f.Caption = "New Registrant" f.cmdSave.Caption = "&Save New Registrant"
4
10002
by: Paul Aspinall | last post by:
Can anyone advise how to display a form on top, and modal, without using ShowDialog?? Thanks
23
2730
by: Chukkalove | last post by:
Im sorry, I dont know the correct description for a hierarchy of parent and child forms. I have a main form that opens a child form modally. This child form in turn opens it's own child form modally. I also have a separate thread running that monitors a card reader. If the user removes the card then the thread calls back the main form to tell it that the card was pulled. The main form should then close down any children leaving the main...
2
2640
by: Mike | last post by:
Hi, I'm having a problem with modal forms on windows. I've written a very short test program, with a main window and a form called from the main window. The form is set to modal with form.setModal(1) before calling form.show(). All works as expected on Linux. The form is modal, not allowing the main window to received the focus. If I call the form from within itself, the topmost form is modal, and not of the previous forms will...
1
1654
by: samentu | last post by:
Hi there. I'm having a little problem here with some forms. Let me describe the problem: my application has a MDI parent form (the form that starts with the application); then when I click a button a modal form appears; this modal form has a button in it that when clicked should close itself, create a new child form for the parent and create another modal form. The thing is that when I click the button on the modal form it does close itself but...
2
3495
by: diogenes | last post by:
I have created many shortcut/popup (aka context, or right-click) menus for my application - instead of toolbars or standard drop-down menus. Within my custom menu, I am using =ShowMainMenu("item") in the On Action event where ShowMainMenu is a public function in frmMain, and "item" is a string mapping to a button click event. (error trapping omitted) Public Function ShowMainMenu(strItem As String) As Boolean
4
4546
by: =?Utf-8?B?Z2luYWNyZXNzZQ==?= | last post by:
I am trying to close/dispose multiple instances of a form but because they are modal and hidden, they do not show up in My.Application.OpenForms. They must be modal, so making them modeless is not an option. I also need to check the values in a spread control on the forms before I close/dispose them. I'm using VB 2005. Is there some way for me to do this?
1
3560
by: Mohit | last post by:
Hi all, I am working on a windows based client server application with multiple forms. All forms are having custom title bars with no default bars. There is one main form. Some forms are opened up as modal while others are opened up as modeless on this main form. Whenever some error occurs in client server communication we show it in modal message box. Now I ran into a case: a modal form is opened up on the main form. And some error...
0
8153
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
8653
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8595
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
8455
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
7126
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...
1
6101
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5552
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
4065
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.