473,320 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Submit Validation causes control to lose value

I have a aspx page that has a few panels on it and have noticed that if a user submits the form and validation kicks in, thus, flagging them that fields were required the panels disappear even though the conditions to display the panels are still met. I.e. checkbox displays more questions. the checkbox is still checked when the form halts the submit and displays "required" labels. But panel is hidden. This also happens with a dropdown, based on a selection more questions are made visible on a panel.

Also, is there such a thing as "on_Submit" for a Subroutine? i.e. like "Page-Load".

Thanx.
Nov 18 '05 #1
2 1750
I have run into similar things in the past. I'm not sure if it was due to a ViewState issue or what ... what I found was that if I defaulted the Visible property to false, then it was buggier than if I set it to true, and only hid the control when it needed to be hidden (instead of showing it when it needs to be shown). That seemed to work out much better.

"Chris" wrote:
I have a aspx page that has a few panels on it and have noticed that if a user submits the form and validation kicks in, thus, flagging them that fields were required the panels disappear even though the conditions to display the panels are still met. I.e. checkbox displays more questions. the checkbox is still checked when the form halts the submit and displays "required" labels. But panel is hidden. This also happens with a dropdown, based on a selection more questions are made visible on a panel.

Also, is there such a thing as "on_Submit" for a Subroutine? i.e. like "Page-Load".

Thanx.

Nov 18 '05 #2
I've tried something else that I think might work:

Sub Page_Load()

'hide system builder panel
systembuilder.Visible = False

'hide convergance panel
convergence.Visible = False

cbhomeconverg.AutoPostBack = True
ddprimbiz.AutoPostBack = True

End Sub

by using Autopostback the controls (checkbox and dropdown) appear to be reviewed to see if they are true and then the panels show/hide accordingly.

thoughts?

what about the form submit question? is there a way to stop the form from submitting is ASPXif a condition was not met (like the old JavaScript Return).

Thanx!
"David Coe, MCAD" wrote:
I have run into similar things in the past. I'm not sure if it was due to a ViewState issue or what ... what I found was that if I defaulted the Visible property to false, then it was buggier than if I set it to true, and only hid the control when it needed to be hidden (instead of showing it when it needs to be shown). That seemed to work out much better.

"Chris" wrote:
I have a aspx page that has a few panels on it and have noticed that if a user submits the form and validation kicks in, thus, flagging them that fields were required the panels disappear even though the conditions to display the panels are still met. I.e. checkbox displays more questions. the checkbox is still checked when the form halts the submit and displays "required" labels. But panel is hidden. This also happens with a dropdown, based on a selection more questions are made visible on a panel.

Also, is there such a thing as "on_Submit" for a Subroutine? i.e. like "Page-Load".

Thanx.

Nov 18 '05 #3

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

Similar topics

4
by: Peloux | last post by:
Hi, I have written some htc in order to validate data in a form. most of htc are attached on 'onblur' event. Now, we would like to use the Enter Key to sublit form, so we use the following...
4
by: Elliot M. Rodriguez | last post by:
I have a Delete button in my datagrid. I'm attempting to add some code confirming whether the user wishes to really delete the item or not. The confirm pops up, but I cannot suppress the...
4
by: owingruters | last post by:
Hi all, I've created an User control. It's an extension of a textbox wich has some extra properties so that validation becomes a lot faster. The control wordks great if autopostback is on....
2
by: Chris Lane | last post by:
Hi, I have a web control button that I use for submitting a form, for some reason this causes a dropdownlist web control I have in a panel at the top of the form to execute it's selected index...
5
by: | last post by:
Hi all, Has anyone been able to write some custom javascript on the onclick event of submit button to do certain things like disable submit button, only submit form once etc. This was a breeze...
2
by: Tim Frawley | last post by:
Source code attached indicates my problem with validation and a button bar save button. Fill the Textbox with some text then tab off the control. The message box will display the text in the...
8
by: wASP | last post by:
Hi, I'm having a problem referencing the elements within an object after a method of that object (a member function) has been activated with an onsubmit handler: - - - - - - - - ...
2
by: Vinny | last post by:
A customer wants me to convert a VB app I wrote for them into a web app for remote users to do data entry. So, I'm writing a small ASP program which prompts the user for data, much like a VB...
0
by: =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?= | last post by:
I'm having trouble working with a Summary Validation control. I need to click my submit button twice for the Summary to display when validation errors occur on the page. Background: My page...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.