|
What. Validate that the format of the email address is OK, or that the email is connected to a live account? The two are considerably different.
If you want to validate the email address, you can use a simple regex to do this (like the following one):
\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
you can use this
<br />
public static bool IsValidEmailAddress(string sEmail)<br />
{<br />
<br />
if (sEmail == null)<br />
{<br />
return false;<br />
}<br />
else<br />
{<br />
return Regex.IsMatch(sEmail, @"^[-a-zA-Z0-9][-.a-zA-Z0-9]*@[-.a-zA-Z0-9]+<br />
(\.[-.a-zA-Z0-9]+)*<br />
\.<br />
(<br />
com|edu|info|gov|int|mil|net|org|biz|<br />
name|museum|coop|aero|pro<br />
|<br />
[a-zA-Z]{2}<br />
)<br />
$",<br />
RegexOptions.IgnorePatternWhitespace);<br />
}<br />
}<br />
<br />
hope it helps
|
|
|
|
|
yea it looks pretty helpful to me. Im gona try it today
thanks alot I appreciate it
|
|
|
|
|
It all depends on how strictly you want to follow the RFC specification. The regular expressions will catch the more commonly used forms, but not all of them.
You can also use the MailAddress[^] class, which is new in .NET 2.0. This class will work for almost all of the RFC formats, but again there are some that it doesn't get right.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
well I'm certainly gonna look into this one... looks interesting to me. hope it works with windows forms too.
|
|
|
|
|
Rocky71 wrote: hope it works with windows forms too.
Yes, it most definately works with WinForms applications.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
yea it did and thanks alot u know I appreciate it.
I also tried the other solution given by teh other friend here n that worked as well
So thanks alot both of u guys
Rocky
|
|
|
|
|
How to create XmlAttributeCollection.
|
|
|
|
|
I think, you cannot create XmlAttributeCollection, but you can add XmlAttribute to XmlElement.
See example:
System.Xml.XmlDocument xmlDocument = new System.Xml.XmlDocument();
System.Xml.XmlElement xmlElement = xmlDocument.CreateElement("MyElement");
System.Xml.XmlAttribute xmlAttribute = xmlDocument.CreateAttribute("MyAttribute");
xmlAttribute.Value = "Hello World";
xmlElement.Attributes.Append(xmlAttribute);
xmlDocument.AppendChild(xmlElement);
xmlDocument.Save("test.xml");
|
|
|
|
|
How I can create New Folder using c#.net 1.1 in (c:\ or d:\ )
this is haneef
|
|
|
|
|
if (!Directory.Exists(directoryName))
{
Directory.CreateDirectory(directoryName);
}
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
public void Backup()
{
SQLServer2Class server = new SQLServer2Class();
Databases databases;
Database2 database;
Backup2Class backup = new Backup2Class();
server.LoginSecure = true;
server.Connect("192.168.1.145" , "ad" , "ad123");
//the above ip address is my remote computer ip address and ad is username,
ad123 is password of remotecomputer.
//i gave userid and password then also it is not working showing exception access is denied
databases = server.Databases;
string database1="pubs";
database = (Database2) databases.Item(database1, null);
backup.PercentCompleteNotification = 1;
backup.Database = database.Name;
SaveFileDialog saveFileDialog1=new SaveFileDialog();
saveFileDialog1.ShowDialog();
this is haneef
|
|
|
|
|
have u added the remote sql server in ur list of sql servers availabel over the network. I dont know if I'm using the rt word for it but anyway. it's shown in the enterprise manager right atthe same level where u see the node for ur local server. I may be wrong but I think u'll get this eror as long as u dont register that.
hope it helps
Rocky
|
|
|
|
|
Hi there,
I hope that every .net programmer knows about app.ico. If not then create a windows application in c# and check out the working folder. You could see such a file there. This file is the picture file that is displayed in the exe file(check out debug folder of your application). Now what i need is, i want to change this app.ico through c# coding. Is it possible for changing the application icon at runtime without re-compiling? When i mention a .ico file, at runtime, this new .ico file should replace the existing default app.ico file and my .exe file in debug folder should also posses this image. How can this be made?
|
|
|
|
|
Be patient! This isn't a service hotline, you pay for. So 1. don't expect to become an answer at all and 2. don't expect to become an answer instantly. We're all answering questions in our spare time and words like urgent or postings as above doesn't help to speed up things but rather decrease the willingness to answer at all.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
|
i donot think anyone here asked urgently!!!
even if some one is in hurry or wants answer instantaneously,there is no harm.it is his need.if he has time why would he ask in a forum.he has every right to ask for an urgent response.nobody will ask urgent unless it is really so.there is no question of decreasing the willingness to answer.
"Change is the only constant thing in life
Either or survive or get extinct"
|
|
|
|
|
chravisankar wrote: i donot think anyone here asked urgently!!!
Do you attend this forum for long now. The word urgent appears in subjects here every day, sometimes yelling at you in uppercase and in the worst case it's the whole subject.
chravisankar wrote: there is no harm.
I agree there is no harm, but also there is no interest (at least in my case). The fact that the problem is urgent to the poster doesn't increase my willingness to help and if I have no time to help at the moment, it won't make me take that time. As I said we're answering questions in our spare time here and aren't working for a service hotline that allows you to give your tickets a priority.
The word urgent gives a post a demanding character. Demanding us to answer, demanding us to answer quick, demanding us to answer this post before dealing with others. Its this demanding character and the fact that it's of no interest for the solution of the posted problem that may decrease the willingness to answer.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Stefan Troschütz wrote: Do you attend this forum for long now.
He's been a member for barely a month or so. Needs to learn the do's and don'ts of this site...
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
Errm - the reason that you think this is because the post has been deleted that asked people to hurry up and answer it.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O'Hanlon wrote: the post has been deleted
That is why I highlight the question and who posted the question. They can go ahead and delete it all they want, but it's embedded in my reply and will stay there unless I delete my post (which I rarely do :-> ).
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
chravisankar wrote: if some one is in hurry or wants answer instantaneously,there is no harm
I want alot of things instataneously, and you know what? Most of them aren't going to happen urgently
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
Stefan Troschütz wrote: words like urgent or postings as above doesn't help to speed up things but rather decrease the willingness to answer at all.
Yep. Thank you
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
Go on then. Who's going to get the beer in?
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O'Hanlon wrote: Go on then. Who's going to get the beer in?
Just give me your GPS coordinates to your house and I'll try to launch you a
You will see a delete button on each of your posts. Press it. - Colin Angus Mackay
|
|
|
|