how to close asp.net web page with out effect of validations

  • Thread starter anil kumar via .NET 247
  • Start date
A

anil kumar via .NET 247

(Type your message here)
hi,
i am using save & cancel webform button my webpage to with somevalidations , when i am trying to save my content it is savedthat time i need a popup msg like ur 'data is saved' , and wheni am trying to click on cancel the page should terminate witheffecting of validations .
and how to open a modal dialog page through vbscript
 
S

Shawn H. Mesiatowsky

create an html button on your form like follows:
<BUTTON type="button" onclick="window.close;">Cancel</BUTTON>
just to close a pop up window, or if it is not a popup window and you want
it to redirect use the following
<BUTTON type="button"
onclick="window.location("somepage.aspx");">Cancel</BUTTON>

using modal dilog boxes is rather tricky in aspx. Modal dialog boxes only
return data to the calling parent window, so you cannot have a regular aspx
page inside a modal form (because when you click submit, it will not post
your data). the only way araound this is to have a modal dialog form that
contains a page with just an empty iframe, and in the ifram you specify the
source as your form you are trying to submit data with. But using the modal
dilaog box, you need client side script to close the parent window, since
the form you are working in is not the window itself, rather a child window
inside an iframe from the parent window.

here is a link for modal dialog boxes
http://msdn.microsoft.com/library/d...r/dhtml/reference/methods/showmodaldialog.asp

(Type your message here)
hi,
i am using save & cancel webform button my webpage to with some validations
, when i am trying to save my content it is saved that time i need a popup
msg like ur 'data is saved' , and when i am trying to click on cancel the
page should terminate with effecting of validations .
and how to open a modal dialog page through vbscript
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top