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

 On Validate

Print topic Send  topic

Author Message
czeuch

Posts: 16
Posted: 07/08/2006, 3:09 PM

Hello, Iīm trying to fill a hidden input when the OnValidate event is launched. The hidden input is named customer and the record (form) is named Customers1.

Customers1customer.Value = Session("customer_id")
(Variable "Customers1customer" is not declared)

Iīve tryied this:

customer.Value = Session("customer_id")

but the CCS didnīt recognized Session sintax (Variable "Session" is not declared). What Iīve to do to correctly fill a hidden input at the OnValidate event?

Thanks!
View profile  Send private message
peterr


Posts: 5971
Posted: 07/08/2006, 3:15 PM

Session("customer_id") doesn't look like .NET syntax. You would need to write code in the programming language that you are using.
Also see http://forums.codecharge.com/search.php?s_keyword=HttpC...m[]=8&s_period=
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
czeuch

Posts: 16
Posted: 07/08/2006, 3:19 PM

Session("customer_id") works perfectly on the BeforeShow event. But at the OnValidate event, it doesnīt work.
View profile  Send private message
peterr


Posts: 5971
Posted: 07/08/2006, 4:17 PM

OK, but you wrote that the .NET engine didn't recognize your syntax in "On Validate". The session syntax used by others at http://forums.codecharge.com/search.php?s_keyword=HttpC...m[]=8&s_period= works OK in "On Validate" event. So why not use it... ?
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
czeuch

Posts: 16
Posted: 07/08/2006, 4:39 PM

HttpContext.Current.Session("customer_id"). This is the correct syntax. But the line

customer.Value = HttpContext.Current.Session("customer_id")

doesnīt work. It gives no error, but the customer input is Required = True, and the record returns an error (The value of field Customer is required!). Itīs seems that the OnValidate isnīt filling correctly the customer input. Weird.

Thanks!
View profile  Send private message
peterr


Posts: 5971
Posted: 07/08/2006, 4:48 PM

Looking at the code, the "On Validate" event happens right after errors.Add , so it's too late to change the value at that time. You can probably add your code in the white area before the validation routine, after the Customers1 class.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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