Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 17th, 2010, 10:16 AM
Authorized User
Points: 403, Level: 7
Points: 403, Level: 7 Points: 403, Level: 7 Points: 403, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2009
Location: Kolkata, India
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Default Validation

I want to create a class containing all the validation logic. And also want to use that class from any webform in my web application. I have inherited 'BaseValidation' class. But how to use the various properties and methods in the 'BaseValidation' class in a effective manner. Please help me.
__________________
Happy coding...

Arnab Roy Chowdhury.
  #2 (permalink)  
Old December 17th, 2010, 07:13 PM
Friend of Wrox
Points: 2,101, Level: 18
Points: 2,101, Level: 18 Points: 2,101, Level: 18 Points: 2,101, Level: 18
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2003
Location: , , .
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Hi,

I'm not a big fan of the built in validation and would rather write my own validation.

I've created a class file called Functions.vb and set every page in the web app to inherit this class file.

Inherits Functions

And write all of the validation that I can use throughout the app in the Functions.vb class.

Like this one:

Function StripPath(ByVal Value As String) As String
Value = Replace(Value, "/", "")
Value = Replace(Value, "|", "")
Value = Replace(Value, ">", "")
Value = Replace(Value, "<", "")
Value = Replace(Value, ":", "")
Value = Replace(Value, "*", "")
Value = Replace(Value, "?", "")
Value = Replace(Value, "'", "")
Value = Replace(Value, ",", "")
Value = Replace(Value, """", "")
Value = Replace(Value, "#", "")
Value = Replace(Value, " ", "_")
Return Value
End Function
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Standalone validation + web form validation morbo Struts 0 August 19th, 2008 04:02 AM
Validation in C++ code_lover C++ Programming 3 July 23rd, 2008 01:26 AM
Validation using Validation Framework kalyangvd Struts 1 January 2nd, 2008 06:53 AM
Validation g_vamsi_krish ASP.NET 1.0 and 1.1 Professional 2 January 11th, 2006 06:46 AM
Validation NiNe ASP.NET 1.x and 2.0 Application Design 1 July 5th, 2005 10:27 AM



All times are GMT -4. The time now is 05:42 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.