CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 required field not validated properly

Print topic Send  topic

Author Message
dikmus

Posts: 19
Posted: 05/25/2005, 12:55 AM

Hi,
In my mssql database one text field is set not to allow nulls.
Also in my record form (ccs, vb.net) this field is set to required.
Now i would hope to see a error message if the field is left blank when submitting the form.
Instead I get a NullReferenceException error page.
Any idea what is wrong?

Thanks Dik


_________________
www.musit.nl
View profile  Send private message
andrewi

Posts: 162
Posted: 05/27/2005, 2:35 AM

First suggestion is to check the properties of the text box on the form.

Check that the Required property is 'Yes' - if so, CCS should display an error message to the user if they try to submit the form with the field blank.
View profile  Send private message
dik mus
Posted: 05/27/2005, 5:38 AM

Yes, the requered property is set to yes, so i indeed would expect a message, but instead i get ther error page
andrewi

Posts: 162
Posted: 05/27/2005, 7:04 AM

Sorry - you did mention that.

You're right - if the page is working properly, you do get a proper CCS error message saying "the value in field xxx is required"

The error message looks like it comes from .Net during the processing of the page, perhaps before anything is sent to sql server. Do you get the normal full-page .Net error message? If so, the section where it gives the line where the error arose would probably be helpful to see.

View profile  Send private message
dik mus
Posted: 05/29/2005, 7:33 AM

Hi, belowis the error page, some lines are in dutch, but i hope it makes more sense to someone else.


Serverfout in toepassing /magazijn1.
--------------------------------------------------------------------------------

De objectverwijzing is niet op een exemplaar van een object ingesteld.
Beschrijving: Er is een onverwerkte uitzondering opgetreden tijdens het uitvoeren van de huidige webaanvraag. Raadpleeg de stacktracering voor meer informatie over deze fout en de oorsprong ervan in de code.

Details van uitzondering: System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.

Fout in bron:

Er is een onverwerkte uitzondering gegenereerd tijdens het uitvoeren van de huidige webaanvraag. Aan de hand van de onderstaande tracering van de uitzonderingsstack kunt u meer informatie verkrijgen over de oorsprong en de locatie van de uitzondering.

Stacktracering:


[NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.]
magazijn1.Controls.CCDirectory.CreateControlHierarchy(Boolean useDataSource) +1438
magazijn1.Controls.CCDirectory.CreateChildControls() +59
System.Web.UI.Control.EnsureChildControls() +100
System.Web.UI.Control.PreRenderRecursiveInternal() +38
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Page.ProcessRequestMain() +1499




--------------------------------------------------------------------------------
Versiegegevens: Microsoft .NET Framework Versie:1.1.4322.2032; ASP.NET Versie:1.1.4322.2032
dik mus
Posted: 05/29/2005, 8:10 AM

I hade another look. The problem is caused by a included (standard css menu) page. The page works fine without that menu. The menu seems to work fine except for the combination with this error processing.
peterr


Posts: 5971
Posted: 05/29/2005, 11:30 AM

Are you able to include that menu into another page? Does it work OK there?
If the problem is related to only one specific parent page that doesn't work, then possibly there is something conflictnig between the menu page and the page that includes it. Not sure if this would help but possibly there are conflicting control names, so first check if the controls on both pages have unique names. If they are unique then contact the support, as this could be some bug that only they can investigate.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
dik mus
Posted: 05/29/2005, 11:39 AM


Hi peter,
The problem is there with all pages, thats why i thought the validation did not work properly. Also I can reproduce the problem with a new page and a new includable menu. I will check with support,

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.