By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,069 Members | 1,716 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,069 IT Pros & Developers. It's quick & easy.

.Net Validation within Modal Dialog Box possible???

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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******@hotmail.com> wrote in message
news:er**************@TK2MSFTNGP10.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

P: n/a
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*****@aboutfortunate.com> wrote in message
news:10*************@corp.supernews.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******@hotmail.com> wrote in message
news:er**************@TK2MSFTNGP10.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

P: n/a
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******@hotmail.com> wrote in message
news:uw**************@TK2MSFTNGP09.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*****@aboutfortunate.com> wrote in message
news:10*************@corp.supernews.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******@hotmail.com> wrote in message
news:er**************@TK2MSFTNGP10.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 discussion thread is closed

Replies have been disabled for this discussion.