473,686 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.Net Validation within Modal Dialog Box possible???

Can a Modal Dialog Box do forms ASP.NET forms validation from within the
Modal Box? I want to pop up a dialog box to the user and have it do its own
post backs with validation checking and then save the data and close the
dialog when the page is valid. I have read a little about using Iframes to
post back to, but was wondering if this would work for what I am trying to
do? Also, does anyone have a code sample of this (postback from modal dialog
box) in action or articles on doing this?

Thank you for you help

Earl
Nov 18 '05 #1
3 2876
Earl,

Instead of using a modal dialog box I think you'll need to use a full blown
window.

A modal dialog won't allow you to run page code inside of it. But you can
pop up a new window, using javascript, and set that new window's parameters
so that it won't show the adress bar or menus, etc. That way it will look
just like a modal dialog and you'll be able to run a full .aspx page inside
of it.

Then you can save any data input into the dialog window on post back and
refresh the parent window when it closes in order to update anything inside
of your main window based on the dialog window.

I have to pieces of code on my web site: www.aboutfortunate.com which may
help you out. They are free.

The first is a javascript object I made. You can download the entire .Net
project by clicking on the "Code Library" link in the upper right of my
site's home page and then click on the "Javascript " button in the menu on
the left. It contains code for inserting a popup window based on a button or
link button click (or various other .net objects). Even if you don't want to
use the entire object you'll be able to use the source code to create your
own.

The second bit of code is in the code library itself. Click the "Code
Library" link in the upper right and then use the search box to search for:
"Close a popup window and refresh the parent window" and you'll have the
other bit of code you'll need.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Earl Teigrob" <ea******@hotma il.com> wrote in message
news:er******** ******@TK2MSFTN GP10.phx.gbl...
Can a Modal Dialog Box do forms ASP.NET forms validation from within the
Modal Box? I want to pop up a dialog box to the user and have it do its own post backs with validation checking and then save the data and close the
dialog when the page is valid. I have read a little about using Iframes to
post back to, but was wondering if this would work for what I am trying to
do? Also, does anyone have a code sample of this (postback from modal dialog box) in action or articles on doing this?

Thank you for you help

Earl

Nov 18 '05 #2
Thank you, Justin,

This is a big help and keeps me from barking up the wrong tree. I will
explore you code over the next few days. Thank you for the assistance.

Earl

"S. Justin Gengo" <sj*****@aboutf ortunate.com> wrote in message
news:10******** *****@corp.supe rnews.com...
Earl,

Instead of using a modal dialog box I think you'll need to use a full blown window.

A modal dialog won't allow you to run page code inside of it. But you can
pop up a new window, using javascript, and set that new window's parameters so that it won't show the adress bar or menus, etc. That way it will look
just like a modal dialog and you'll be able to run a full .aspx page inside of it.

Then you can save any data input into the dialog window on post back and
refresh the parent window when it closes in order to update anything inside of your main window based on the dialog window.

I have to pieces of code on my web site: www.aboutfortunate.com which may
help you out. They are free.

The first is a javascript object I made. You can download the entire .Net
project by clicking on the "Code Library" link in the upper right of my
site's home page and then click on the "Javascript " button in the menu on
the left. It contains code for inserting a popup window based on a button or link button click (or various other .net objects). Even if you don't want to use the entire object you'll be able to use the source code to create your
own.

The second bit of code is in the code library itself. Click the "Code
Library" link in the upper right and then use the search box to search for: "Close a popup window and refresh the parent window" and you'll have the
other bit of code you'll need.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Earl Teigrob" <ea******@hotma il.com> wrote in message
news:er******** ******@TK2MSFTN GP10.phx.gbl...
Can a Modal Dialog Box do forms ASP.NET forms validation from within the
Modal Box? I want to pop up a dialog box to the user and have it do its

own
post backs with validation checking and then save the data and close the
dialog when the page is valid. I have read a little about using Iframes to post back to, but was wondering if this would work for what I am trying to do? Also, does anyone have a code sample of this (postback from modal

dialog
box) in action or articles on doing this?

Thank you for you help

Earl


Nov 18 '05 #3
Earl,

No problem. If you have any questions or run into any problems let me know.
I'd be happy to help out in any way I can.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Earl Teigrob" <ea******@hotma il.com> wrote in message
news:uw******** ******@TK2MSFTN GP09.phx.gbl...
Thank you, Justin,

This is a big help and keeps me from barking up the wrong tree. I will
explore you code over the next few days. Thank you for the assistance.

Earl

"S. Justin Gengo" <sj*****@aboutf ortunate.com> wrote in message
news:10******** *****@corp.supe rnews.com...
Earl,

Instead of using a modal dialog box I think you'll need to use a full blown
window.

A modal dialog won't allow you to run page code inside of it. But you can
pop up a new window, using javascript, and set that new window's

parameters
so that it won't show the adress bar or menus, etc. That way it will look just like a modal dialog and you'll be able to run a full .aspx page

inside
of it.

Then you can save any data input into the dialog window on post back and
refresh the parent window when it closes in order to update anything

inside
of your main window based on the dialog window.

I have to pieces of code on my web site: www.aboutfortunate.com which may help you out. They are free.

The first is a javascript object I made. You can download the entire ..Net project by clicking on the "Code Library" link in the upper right of my
site's home page and then click on the "Javascript " button in the menu on the left. It contains code for inserting a popup window based on a button or
link button click (or various other .net objects). Even if you don't
want to
use the entire object you'll be able to use the source code to create
your own.

The second bit of code is in the code library itself. Click the "Code
Library" link in the upper right and then use the search box to search

for:
"Close a popup window and refresh the parent window" and you'll have the
other bit of code you'll need.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Earl Teigrob" <ea******@hotma il.com> wrote in message
news:er******** ******@TK2MSFTN GP10.phx.gbl...
Can a Modal Dialog Box do forms ASP.NET forms validation from within the Modal Box? I want to pop up a dialog box to the user and have it do its
own
post backs with validation checking and then save the data and close

the dialog when the page is valid. I have read a little about using

Iframes to post back to, but was wondering if this would work for what I am
trying
to do? Also, does anyone have a code sample of this (postback from modal

dialog
box) in action or articles on doing this?

Thank you for you help

Earl



Nov 18 '05 #4

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

Similar topics

3
2846
by: Andrew Baker | last post by:
OK this has me perplexed, puzzled and bamboozled! I have a remoting service which I displayed a message box in. I then wondered what would happen if a client made a call to the service while the message box was being displayed. Since the call comes in on a different thread the client call was not blocked. This seemed to make sense to me. Next I thought, what will happen when the client calls into the server if I try to use a delegate...
4
10144
by: usl2222 | last post by:
Hi folks, I appreciate any assistance in the following problem: I have a form with a bunch of dynamic controls on it. All the controls are dynamically generated on a server, including all the validators. The user enters the data, presses OK. My OK button is dynamically generated as well, with some code-behind logic in
3
526
by: Earl Teigrob | last post by:
Can a Modal Dialog Box do forms ASP.NET forms validation from within the Modal Box? I want to pop up a dialog box to the user and have it do its own post backs with validation checking and then save the data and close the dialog when the page is valid. I have read a little about using Iframes to post back to, but was wondering if this would work for what I am trying to do? Also, does anyone have a code sample of this (postback from modal...
10
2748
by: Guadala Harry | last post by:
I have a modal dialog that currently does all of the following except item 4. 1. lets users select a graphic from a list of thumbnails (and when selected, displays the full-size image in a preview DIV) 2. when users close the dialog, the application receives the URL to the selected graphic. 3. the modal dialog lets the users upload a new graphic if the dialog does not present them with one they are already happy with. 4. upon uploading...
4
2221
by: forest demon | last post by:
i've seen previous posts somewhat related to this, so i apologize if this is redundant. I have a main form with separate threads. When showing a dialog like <dialog>.ShowDialog(), it functions as a non-modal instead of modal. any help is appreciated, thanks.
10
4835
by: bern11 | last post by:
If Form1 opens Form2 modally, how do I capture clicks on Form1 when Form2 is open? I want to click on Form1 and read the mouse co-ordinates into Form2. Since Form2 is open modally, Form1 mouse-events do not fire. What events on Form2 fire? I could open Form2 modelessly, then process from within Form1 mouse events. Is there any other way?
4
2899
by: Johnny Jörgensen | last post by:
In my current project I've got some DataGridViews containing multiple hidden columns. For some reason 8 of the 10 grids I've got on my form has suddenly started showing 1 of the hidden columns (not all of them). If I look at the grids in the designer, the columns ARE invisible, but still they're shown at runtime. I cannot figure out why. I've searched the entire project to see if I could find any code setting the columns visible, but...
2
3502
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
2320
by: fran_j_diaz | last post by:
Hi, I have a page with an Ajax modal popup. I would like to know when my Modal popup is opened, my page still able to modify. Is it possible ? (I use Visual Studio 2005, c# )
0
8585
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
8517
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
9057
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
8934
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...
1
8770
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7603
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
4309
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...
1
2947
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
2
2208
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.