.Net Validation within Modal Dialog Box possible???

E

Earl Teigrob

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
 
S

S. Justin Gengo

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
 
E

Earl Teigrob

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

S. Justin Gengo

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top