Home | Articles|Namespace|Interview Questions|Tools|Jobs|Projects|Community
Asp.net Tutorials

»Dotnet Ads
»Message Boards
Message Boards
Dotnet Books

»Member Details
Register
Login
LogOut
Submit Code
Submit Jobs
Submit Projects

»Competition
Community
Winners
Prizes
Write For Us
Members

»Other Resources
Links
Dotnet Resources

Check if a given color hexadecimal is true

This function checks if a entered color value is a textBox is in a valid hexadecimal format

''' CheckTextBoxColor("#ffffff") returns true
Private Function CheckTextBoxColor(ByVal value As String) As Boolean
If value <> String.Empty Then
If Not value.Length = 7 Then
Return False
End If
If Not value.StartsWith("#") Then
Return False
End If
Dim temp As String = value.Substring(1, 6)
Try
Int("&H" & temp)
Return True
Catch ex As Exception
Return False
End Try
End If
End Function

Have a Question and dont know the answer post it below and get answers in minutes

Due to spam this feature is disabled
To get answers fast , make sure you enter a detailed subject for example: "DataGrid issues need answer" not "DataGrid"

Subject:

Catjegory Name:

Message:



© 2008 dotnetwatch.com -- Privacy policy

Website Design & Internet Marketing by Shivam