Link to home
Create AccountLog in
Avatar of sarah_siu
sarah_siuFlag for United States of America

asked on

How to create pop-up boxes and close button on a web form?

Hi,
I am currently working on a web form that can provide the ability to capture data in an MS SQL DB on the backend.  I have built the web form using visual web developer 2005 express and currently, data can be passed between the webform and the database.

I would like to create a message box where upon clicking submit, a message box will pop up stating either (data submitted. thank you.) OR (data not submitted, please fill out all appropriate fields.).  I have inputted validations: regular expression validation and required field validation into the source code.  

Secondly, my "exit" button doesn't work properly.  If the fields were not field out appropriately, i cannot close the form.

I've attached my current code with this question.

So my questions are as follows:

1. Creating a message box to indicate if form has been successfully submitted or not (and if not, to go back to the beginning of the form to fix any required fields)

2. Have the message box appear at the center of the webform as oppose to outside the webform

3. How to close the form bypassing all the validations i've put in.

Thanks a bunch!
Sarah

ASKER CERTIFIED SOLUTION
Avatar of Greg Gamble
Greg Gamble
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Melih SARICA
validation and other operations are all different..

validation happens before postback.. but data manupulation ops. are ll occur after the page is postback.

so for validation ..

U can use an validation summary control to get all messages in a box.  and if u wanna show it as a popup dialog .. u must make some lil changes..  set ShowMessageBox  property of the validationcummary control to true..

For data postback alerts..

put a asp.panel and a asp.label in it..  and make panen visible=false
U must handle Updated or inserted events of the form element.. and
it these events.. write the desired message to the label in asp.panel and set its visible to true..

Avatar of sarah_siu

ASKER

I am currently using VB and the web form is built on visual web developer 2005 express.  My coding sklills are quite limited...

bmxer - i've set the cause_validation to false and the exit button is working now - thanks!

non_zero - i don't quite understand what you mean by using a validation summary control...is it something i add onto the source code?  can you elaborate?

Really appreciate the feedbacks - thanks!

Sarah
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks a lot for your help!