|
Hi,
I dont want to use javascript coz it is not a web application. Since it is a windows application i want to find a code which will validate the characters entered using ASCII codes.
Waiting for ur reply.
Thanks
Riz
|
|
|
|
|
This should do it
Function IsValidEmail(strIn As String) As Boolean
' Return true if strIn is in valid e-mail format.
Return Regex.IsMatch(strIn, "^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$")
End Function
God bless msdn...
|
|
|
|
|
thanks a lot for ur solution
|
|
|
|
|
@kulazfuk
thanks that helped me too..
|
|
|
|
|
Hi,
If have this solution in VB.NET.
So it wil be helpfull for you.
Regards
Public Shared Function ValidEmailAddress(ByVal emailAddress As String, ByRef errorMessage As String, ByVal Textbox As System.Windows.Forms.TextBox) As Boolean
' Confirm there is text in the control.
If Textbox.Text.Length = 0 Then
Return True
else
errorMessage = "E-mail address is required."
Return False
End If
' Confirm that there is an "@" and a "." in the e-mail address, and in the correct order.
If emailAddress.IndexOf("@") > -1 Then
If (emailAddress.IndexOf(".", emailAddress.IndexOf("@")) > emailAddress.IndexOf("@")) Then
errorMessage = ""
Return True
End If
End If
errorMessage = "E-mail address must be valid e-mail address format." + ControlChars.Cr + _
"For example 'someone@example.com' "
Return False
End Function
Hi,
If have this solution in VB.NET.
So it wil be helpfull for you.
Regards
H.w. Hendrick, Netherlands
|
|
|
|
|
hi all,
how can we c the line number in our code window?
Thnaks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
dear its so easy.........line no. is displayed on status bar (Down on window)of our code window
as Ln .
for e.g. Ln 19 col 9
it means our cursor is on line 19 & col 9
is it ok or ur question was differnt?
priya
|
|
|
|
|
If you're using .NET, then, yes. Just go into the Tools/Options/Text Editor, choose VB, and check the box.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Sir,
Can I programically find , In which line number presently I am.(using vb.net 2005)
Thanks and regards
pankaj
|
|
|
|
|
I doubt it
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
sir,
U mean , i can't calculate the linenumber in the textbox (multiline option or richeditcontrol )
Thnaks and Regards
pankaj
|
|
|
|
|
You know, you ask a different question every time. Yes, of course you can work out a line number from a textbox. Just count the number of newlines.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
sorry sir, I did not mean that . I wanted to know , the line number , On which the cursor presently is, into the textbox , programically.
Thanks and regards
Pankaj
|
|
|
|
|
Hi,
you can take a look here for a start:
http://www.codeproject.com/cs/samples/linenumberingapp.asp[^]
There are also heaps of hits on google which let you use GetCurPos() and GetCursorPos() to get the position of the caret if you wish to return the line you are currently editing. I'm sure there are some built in things in the framework, though I'm really tired and can't think at the moment.
Cheers,
Daniel
|
|
|
|
|
goodMorning Frendz,
I have one column of datagridview as "date"....so i wnt to ask-> "Is there a columntype of datagridview like "DatagridviewDateTimepicker" like "DataGridViewComboBoxColumn"....if i wnt take datetimepicker on datagridview's each row on specified column wht should i do?
Help me Plizz.
Regards priya
|
|
|
|
|
|
Mam ,
Is this link useful?
Regards
Pankaj
|
|
|
|
|
Thank u so much pankaj....thts nice site.
regards priya
priya
|
|
|
|
|
Hi everyboy. I want to encrypt content in text file and decrypt it to normal text file. please show me the code that do it. thank beforehand.
|
|
|
|
|
|
They System.Cryptography namespace is your best bet here.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
best is rijandel or something like that!!! try Google it...
|
|
|
|
|
How to make a scrolling marque? or do you have some web links that could help my search faster.. thank you...
your help is highly appreciated.. thank you guys...
|
|
|
|
|
Where, in your web app, or your desktop app ? If the latter, the answer is to write one, or google for one that already exists. You'd just set a timer and modify a string you render, to create a scrolling effect.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|