473,326 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Part String

TCB
How can I separate multiple email addresses entered in a single textbox so I
can send email in ASP.NET 2.0, the email addresses are separated by (,) or
(;)

Thanks
Mar 21 '06 #1
2 1388
Try using the String.Split() method. This method returns an array of Strings
using one or more specified delimiters. I'm sure you can figure out the
syntax using the documentation, if you need help just ask. Good Luck!
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"TCB" <tc******@hotmail.com> wrote in message
news:O$****************@TK2MSFTNGP14.phx.gbl...
How can I separate multiple email addresses entered in a single textbox so
I can send email in ASP.NET 2.0, the email addresses are separated by (,)
or (;)

Thanks

Mar 21 '06 #2
If the emails are seperated with mixing commas and semicolons, you can use
String.Replace() to unify the seperator character first, then use
String.Split() to split it into a string array.

For example:
Dim s As String = TextBox1.Text
Dim addresses() As String
s = s.Replace(",", ";") 'Replace all "," with ";"
addresses = s.Split(";")

Now you can just loop through the addresses to get each address.
Hope this helps,
VHD50.
"TCB" wrote:
How can I separate multiple email addresses entered in a single textbox so I
can send email in ASP.NET 2.0, the email addresses are separated by (,) or
(;)

Thanks

Mar 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Matthias Ludwig | last post by:
I'm trying to create a directory on the web server with a vb.net code: .... Dim dirName As String = "w:\filepath\images" If Not Directory.Exists(dirName) Then...
1
by: Alex | last post by:
Hello, in my company, we have a diagnostic tool for hardware. Depending on the hardware projcet, a different project configuration is needed. The configuration file is written in XML and...
5
by: ad | last post by:
I have a string like string myString="dog,cat,dog,tiger" I want to delete the duplication part, and make myString to "dog,cat,tiger" How can I do that?
1
by: SMG | last post by:
Hi All, My Send mail system was working very fine, today suddenly it started giving me following error. Can any one suggest why this is happening so. I am using system.Web.Mail "The requested...
12
by: Ima Loozer | last post by:
OK folks here is what I need help with. Lets assume I have a text field that will contain AlphaNumeric data. There is no set pattern to the field such that any given character can be either alpha...
2
by: Ken Crismon | last post by:
Hello, I am currently working on an embedded systems project where by I have written a small web server that is being hosted on our internet appliance (running on an Atmega128 chip and doing...
0
by: south622 | last post by:
I'm taking a beginning Java course and I'm stuck in week eight of a nine week course. If anyone could help me I would greatly appreciate it. This assignment was due yesterday and each day I go past...
0
by: bill | last post by:
IMAP_FETCHBODY requires the "part number" to fetch. Can anyone point me at how the part numbers are derrived. for example, here is the formatted parts array from a message: Parts: array(2) {...
3
by: wassimdaccache | last post by:
I'm using this code to search a value on a continuous form it is working properly Am I able to write for example part of the string Dim strCriteria As String Dim rst As DAO.Recordset ...
4
by: Andrew Poulos | last post by:
I have a string that looks like this "cmi.interactions.fred.id" I need to test that: - the first part of the string is "cmi.interactions." (case sensitive). - the last part of the string is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.