473,320 Members | 1,914 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.

Runtime Validation

I have a webcontrol that extends from System.Web.UI.WebControls.
WebControl. It has 3 drop downlists for day, month, year. The day,
month, year then form the property called SelectedDate. The control
also has properties for MinimumDate , MaximumDate. During design time
while seting property I have validations to ensure
MinimumDate<SelectedDate<MaximumDate.
How can I achieve this validation during runtime when the User enters
a date which is greater than MinimumDate.

Jul 25 '07 #1
1 1471
I imagine that each of the three drop downs will call a common function
to set the SelectedDate. At that point, I would check to see what the date
is, to see if it is within your range. If not, then throw an exception.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<br************@gmail.comwrote in message
news:11*********************@i38g2000prf.googlegro ups.com...
>I have a webcontrol that extends from System.Web.UI.WebControls.
WebControl. It has 3 drop downlists for day, month, year. The day,
month, year then form the property called SelectedDate. The control
also has properties for MinimumDate , MaximumDate. During design time
while seting property I have validations to ensure
MinimumDate<SelectedDate<MaximumDate.
How can I achieve this validation during runtime when the User enters
a date which is greater than MinimumDate.

Jul 30 '07 #2

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

Similar topics

11
by: Paul Rubin | last post by:
I frequently find myself writing stuff like # compute frob function, x has to be nonnegative x = read_input_data() assert x >= 0, x # mis-use of "assert" statement frob = sqrt(x)...
1
by: Mark Ramey | last post by:
I have an assembly that I want to license to developers. I don't want to license the runtimes that they deliver to their customers. There are no real design-time controls, only some classes that...
1
by: Guadala Harry | last post by:
I will be creating a new ASPX that requires many controls to be inserted into the page at runtime. The controls include things like TextBox, RadioButtonList, CheckBoxList, DropDownList, etc....
1
by: Paul | last post by:
hello, My application is built in VB6 and i'd like to upgrade to VB.NET and make some fairly large changes at the same time. The application writes a script (simular to VBScript) for the user...
14
by: Rich | last post by:
I am converting my enterprise solution from VS 2003 (.NET v1.1.4322) to VS 2005 (.NET v2.0.50727). The entire solution uses serveral technologies - Windows Server 2003 (AD, SQL Server 2000, IIS,...
1
by: mrc-1 | last post by:
Hello, I built a XSD File with the tool XML-Spy from Altova. My XML file consists of about 5000 elements. If I use the validate button in XML-Spy, the validation process takes about 8 seconds....
1
by: rickcross | last post by:
I am trying to use the Access 2007 runtime. I have a program that is fully working in 2007 but when I install the runtime version with same Operating system and Access 2003 installed I have...
28
malav123
by: malav123 | last post by:
Hi, I am using one Legend for one section of Filtering that contains one button also and i want to put some validation in that section on that button's click event but when i calls...
2
by: Andrus | last post by:
My instantiated entity object base type (entityBase) contains virtual empty validation methods. To implement runtime validation I need to overriide those validation methods after object is...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...

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.