|
Hi,
I am using the following regular expression to check for a valid e-mail address:
Regex _EmailRegex = new Regex(@"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$");
When I type in my.email.@mail.com then it validates that it is a valid email address.
So when I try the following (address, subject and body are input variables):
MailMessage msg = new MailMessage("my.email.@mail.com", address, subject, body);
The I get the following error: The specified string is not in the form required for an e-mail address.
Why does my e-mail validate to try, but when I use it in MailMessage it fails?
Please can someone advise?
Thanks
|
|
|
|
|
Well, I guess the obvious answer is that your regex is not perfect. Can an address end in a dot ? I've never seen one.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
You and your snotty answers... People come to this forum seeking help and advice, not snotty answers!! Instead of chirping you could maybe have helped help a solution. I didn't say that is my e-mail address. It was an e-mail string that I was validating what could have been typed in.
|
|
|
|
|
I have a registration page.In this i validated the diff fields and ihave a reset button.problem is that when half of form is filled and i press reset button then it shows validatin error message corresponding to other fields..But i want to reset all fields when press reset button.what to do???plz help...
|
|
|
|
|
set causesvalidation = false for the reset button
Padmanabhan
|
|
|
|
|
I might be mistaken, but try to put the controls to be validated in validation group, or try setting the validation off of the reset button, I think the property name is something like CancelValidation. Let me know if this does not help.
|
|
|
|
|
From where I can get rss of Indian stock market.Simply I want to retrieve stock index and prices of indian market.Plz help me...
|
|
|
|
|
dynamically How to add a multiple tabcontrols in asp.net2.0 using azax tab container control
|
|
|
|
|
It's AJAX. If you could spell, perhaps google would help you more.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
How to add a multiple tabs dynamically using azax tabcontainer
|
|
|
|
|
i am reterving a integer value by querystring.
e.g
In page load
dim Value as double
Value = Val(Request.QueryString("Val") & 0)
now when val =10.0 then it works fine. when val=10 then it return 100
cud anyone tell me the reason of this??
One person's data is another person's program.
--J.Walia
|
|
|
|
|
i dono vb.net but in c# i use like this and it works fine
//double d = double.Parse(Request.QueryString["val"].ToString());
Padmanabhan
|
|
|
|
|
Instead of Val(), use Convert.ToInt32() or Convert.ToDouble().
Dim value as Double = Convert.ToInt32(Request.QueryString("val") & "0") or
Dim value as Double = Convert.ToDouble(Request.QueryString("val") & "0")
|
|
|
|
|
My site is working fine in IE7. But it is not showing rightly in IE6.
I have used sitemap in masterpage which has broken down
Thanks for help
|
|
|
|
|
What exactly is your question?
|
|
|
|
|
Hai all
I am using infragistics calendar control , i need to format the
selected calendar date to "dd/MMM/yyyy" . Can anyone help me .
Thank you
|
|
|
|
|
I was curious as well so did some digging here: WebDateChooser Format - Infragistics Community[^]
this.WebDateChooser1.Format = Infragistics.WebUI.WebSchedule.DateFormat.Short;
System.Globalization.CultureInfo c = new System.Globalization.CultureInfo("en-US");
c.DateTimeFormat.DateSeparator = "/";
c.DateTimeFormat.ShortDatePattern = "MM/dd/yyyy";
this.WebDateChooser1.CalendarLayout.Culture = c;
This quote is also worth noting:
Unfortunately WebDateChooser supports only "3 fields" format and MMM/MMMM is not supported in edit mode, but only M/MM.
|
|
|
|
|
Sorry, forgot to note obviously to change
c.DateTimeFormat.ShortDatePattern = "dd/MMM/yyyy";
|
|
|
|
|
Thank you for the reply and i worked out it . thanks again
|
|
|
|
|
Hi, need a little bit of advice.
I have a web app which consists of a user profile page, amongst others. When the user profile page is accessed I read the user's information into an object from a database and display it. If the user posts back on that page should I be re-reading the user's information each time or store the user object in a session variable?
Any advice is appreciated, thanks.
|
|
|
|
|
you can store the information in caching and retrive it
Padmanabhan
|
|
|
|
|
You should store it in Session variable.
Regards,
_Anil
jhgdgf
|
|
|
|
|
hi all,
please help me in this , i creating a websteup project while installing in client machine the following conditions have to check ,
1)If SQL Server 2005,
then make sure to check the SMO version and suggest if there is any
mismatch. If appropriate SMO version is not found, then we can inform
the user and install that. If user says MySQL 5.1, then check if
appropriate driver dll file is found, if not raise an error and
suggest user where to get it.
2) If SQL Server 2005 is selected, then we need to ask if the database
already created or not. If created, then you need to ask for
servername(or ip), database name, port number, userid/password, then
go and create the required tables and insert the rows. If database is
not created, then you need to create database, create tables, insert
rows, etc., If we have to create database, then we need to ask Server
name (or ip adress), port number(default 1433), where the data file,
log file going to reside, database name, initial database size, dba
login credentials, etc.,
3) If MySQL 5.1 is selected, then we need to ask if the database is
already created or not. If created, then we need to ask for
userid/password, port number, database name, port number,
userid/password, then go and create required tables and insert the
rows. if daatabase is not created, then you need to create database,
create tables, insert rows, etc., If we have to creat database, then
we need to ask server name(or ip address), port number (default 3306),
database name, login credentials, etc.,
Please suggest me if any article is available in net i tried lot for this .but unable to find correct info .still trying....
any help please
Thhanks and regards,
Guru
|
|
|
|
|
Hi all ..
I have a problem with Ajax tab container.I have used this my pplication it is working fine in Mozilla but in IE it is rendering as visible:hidden.
I worked a lot on this.
can plz provide some help on this.
Thank you.
siri
|
|
|
|
|
Well, as per the other discussions says, this is a bug with the library. And they have provided a workaround by setting ActiveTabIndex = 0 from your code. Have you tried that?
|
|
|
|