Object Oriented Programming (OOP) Concepts April 19 2006
Abstraction (Abstract Class): The process of identifying common patterns that have systematic variations; an abstraction represents the common pattern and provides a means for specifying which variation to use. An abstract class is a parent class that allows inheritance but can never be instantiated. An example is the Shape Class. Creating an instance of a generic shape does not make sense but using the Shape Class to create a Square class does make sense.
Assembly:
An Assembly is a logical unit of code
- Assembly physically exist as DLLs or EXEs
- One assembly can contain one or more files
- The constituent files can include any file …
RangeValidator
The RangeValidator is a web control that has the ability to automatically validate data entry between a maxiumum and minimum value.
One would use the RangeValidator in the typical web control fashion of :
The RangeValidator is able to validate the following:
- Currency
- Dates
- Strings
- Doubles
- Integers
Here are the basic parameters to assign when using the RangeValidator:
- TYPE : Currency, Date, String, Integer, Double
- RUNAT : SERVER
- ID : Unique ID for the control
- ControlToValidate : The ID of the control that requires validation
- MaximumValue : The maximum allowed value
- MinimumValue : The minimum value
- ErrorMessage : The message that appears when the validation is unsuccessful
Thats about it.
VB.NET and DateTime Comparison March 09 2006
After doing some DateTime comparison tests, I have come to some strange conclusions.
The DateTime.Compare() method is not reliable when comparing a database record DateTime with a VB.NET DateTime
The “=” comparison is not reliable when comparing a database record DateTime with a VB.NET DateTime
The easiest way to do the datetime comparison between various forms of the DateTime datatype is to simply convert it to a string and compare!
e.g.
Dim dr as DataRow
Dim dt1 as DateTime
Dim dt2 as DateTime
… Fill ‘dr’ with some database data…
dt1 = Now()
dt2 = dr.item(”some_db_datetime”)
if(dt1.toString.trim = dt2.toString.trim) then
‘ True Condition
else
‘ False Condition
EndIf
Using The SimpleACL Class February 17 2006
A few minutes ago I posted a Simple ACL Class for VB.NET
The whole idea behind an ACL is to convert human “real-world” permissions to a single number representation. This eliminates the need for setting rows and rows of bits, true / false etc within database entries.
Using this class is fairly easy as I really only have 5 tasks which I’m interested in controlling permissions for (Tasks A-E)
To start things off we instantiate the class
Private myACL As clsSimpleACL myACL = New clsSimpleACL
From there if we want to “Allow” or “Deny” various permissions, we simply call the appropriate routines within the …
IE Web Controls Not Supported February 03 2006
I was just looking up some reference information on the ol’ MSDN when lo-and-behold the IE Web Controls that were raved about in many ASP.NET books are no longer supported by the evil Redmond Empire.
Its probably because they suck…
Actually the problem lies in the fact that once you start ASP.NET coding, you are so used to having a tight relationship with server objects and being able to control things from the server side through (runat=”server”) that items such as TabStrips become a real pain in the ass. Ever try to embed panels and the like within friggin …
| older posts »