![]() |
Web Development »
ASP.NET Controls »
General
Intermediate
Hive Multi-Validating Self Textbox ControlBy VectorXA Multi-Validating Textbox Control for ASP.NET |
VB, Windows, .NET 1.1, ASP.NET, VS.NET2003, Dev
|
|
Advanced Search |
|
|
|
||||||||||||||||
Free to use and modify as long as header stays in place. Users must also send an email to the author's email address stating where they are using the code. If any modifications are made to this assembly users must email changes to author's email address.
THIS CODE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS CODE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Combines textbox and multi-validation in one control. Allows textbox to do self checking and self error response messages. Control can also protect against sql injection attacks and client script attacks. Textbox also can do credit card checking using the LUHN Formula Mod-10 check. Other validation types include PHONE, EMAIL, ZIP CODE, CREDIT CARD, URL, INTERNATIONAL PHONE, DATE, ADVANCED DATE, UK DATE, UK POSTAL CODE, SSN and IPADDRESS.
1.0 beta (My Control is still in testing mode but seems almost bug free! But what code doesn't have bugs?)
<%@ Register TagPrefix="Hive" NameSpace="Hive.Controls" Assembly="Hive"%>
Then add the textbox control in your form.
<Hive:textbox id="textbox1" runat="server" req="True"/>
Below is a list of properties and what they do.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
My type property can run many validation type functions. I have creating many
different types already: PHONE, EMAIL, ZIPCODE, CREDITCARD, URL, INTERNATIONALPHONE,
DATE, ADVANCEDDATE, UKDATE, UKPOSTALCODE, SSN, IPADDRESS and so on. This makes
it so neat to have these at your disposal at any time. My control Implements
IValidator which allows me to use the isvalid and
errormessage properties. Doing this allows
me to control the page.isvalid property and change it for each control. So each
control can do multiple validation. My control can check character length of both
min and max. It can also check if a textfield is required.
My control can also check characters to make sure those characters are allowed. By setting the chars property character validation will occur: ALL, NONHTML, NOQUOTES, NODOUBLEQUOTES, ALPHA, ALPHANUMERIC, NUMERIC, etc. By controlling the characters you can protect against sql injection and client script attacks. You can also make sure your database doesn't get screwed up. HEHE ;)
My control has so many features in it that sometimes I forget I created it. LOL
Anyway I hope this has been a little help for you guys on how to do custom controls with custom validation. If you guys like my code let me know.
| You must Sign In to use this message board. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 31 May 2004 Editor: Nishant Sivakumar |
Copyright 2004 by VectorX Everything else Copyright © CodeProject, 1999-2009 Web11 | Advertise on the Code Project |