Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 2nd, 2005, 05:17 AM
Authorized User
Join Date: Aug 2004
Location: , , .
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default validation on textbox

i have the following for :
station name:
inflow target:
outflow target:
inflow actual:
change of storage:
outflow actual:

and i have a bit of complicated issue,that when a user enters the inflow actual and change of storage,they should satisfy the following equation:

inflow actual - (change of storage) =~ outflow ctual
(=~ means the value of the right hand side should be equal or different by 2.5% from the left hand side)

i want the user when entering those values ,if they are more than the specified criteria,it gives a warning pop up message saying(your value exceeds the agreed range,do you want to continue)then yes or no buttons in order to fill the remaining fields of the form and press confirm to save them.
is that possible???

Old May 2nd, 2005, 01:45 PM
Friend of Wrox
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts

You could definitely if you displayed a message stored in a panel, and shown the panel whenever the user submitted the values; you could add javascript to the button that submits it that if the values are outside the range of calculation, whether you want to submit them or not. This works by adding an onclick, and stating "return CallFunctionToCalculate()". The function would do the calculation, and return a boolean that's returned from the Confirm javascript method. Confirm gives a yes/no response to the user, and returns a boolean.

Old May 4th, 2005, 02:29 AM
Friend of Wrox
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76

I think you should do some research on using the Validation controls

These links might be useful



Similar Threads
Thread Thread Starter Forum Replies Last Post
TextBox entry validation thillai Visual Basic 2005 Basics 6 February 20th, 2008 07:23 AM
Textbox validation rhd110 .NET Framework 2.0 1 March 28th, 2007 02:49 PM
textbox validation in c# dhol C# 3 July 22nd, 2005 05:57 AM
TextBox Validation Brettvan1 VB.NET 2002/2003 Basics 1 June 23rd, 2005 08:58 AM
Textbox Validation phudong3da Dreamweaver (all versions) 2 May 9th, 2005 02:47 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.