Click here to Skip to main content
15,892,005 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHidden Query String Pin
scotlandc26-Jun-09 3:45
scotlandc26-Jun-09 3:45 
AnswerRe: Hidden Query String Pin
Manas Bhardwaj26-Jun-09 4:22
professionalManas Bhardwaj26-Jun-09 4:22 
GeneralRe: Hidden Query String Pin
scotlandc26-Jun-09 4:32
scotlandc26-Jun-09 4:32 
QuestionHiding value into grid view Pin
Bandanenilima26-Jun-09 1:56
Bandanenilima26-Jun-09 1:56 
AnswerRe: Hiding value into grid view Pin
padmanabhan N26-Jun-09 2:00
padmanabhan N26-Jun-09 2:00 
AnswerRe: Hiding value into grid view Pin
Gary Stafford26-Jun-09 2:45
Gary Stafford26-Jun-09 2:45 
Questioncan't get multiple files when attachment through stream class. Pin
pujafaldu26-Jun-09 1:54
pujafaldu26-Jun-09 1:54 
AnswerRe: can't get multiple files when attachment through stream class. Pin
Manas Bhardwaj26-Jun-09 2:31
professionalManas Bhardwaj26-Jun-09 2:31 
pujafaldu wrote:
but if i want to attach multiple files then it overwrite to first file with second.


How are you attaching multple files?
The code only seems to work as far as there is one attachment.

In fact your method should look like:

public bool SendMailToExternalUser(string strToEmail, string strbody, string strSubject, List<string> PlstFileNames, List<Stream> PlstStreams)
		{
			MailAddress from = new MailAddress(Config.MailFrom);
			MailAddress to = new MailAddress(strToEmail);

			MailMessage mail = new MailMessage(from, to);
			mail.Subject = strSubject;
			mail.Body = strbody;
			mail.IsBodyHtml = true;
			mail.Sender = from;
			
			for(int LiCount = 0; LiCount < PlstFileNames.Count; LiCount++)
			{
				Attachment attachFile = new Attachment(PlstStreams[LiCount], PlstFileNames[LiCount]);
				mail.Attachments.Add(attachFile);
			}

			SmtpClient SmtpMail = new SmtpClient(Config.MailServerSmtp);
			SmtpMail.Send(mail);
		}


Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

GeneralRe: can't get multiple files when attachment through stream class. Pin
pujafaldu26-Jun-09 2:48
pujafaldu26-Jun-09 2:48 
GeneralRe: can't get multiple files when attachment through stream class. Pin
Manas Bhardwaj26-Jun-09 3:14
professionalManas Bhardwaj26-Jun-09 3:14 
GeneralRe: can't get multiple files when attachment through stream class. Pin
pujafaldu26-Jun-09 3:44
pujafaldu26-Jun-09 3:44 
AnswerRe: can't get multiple files when attachment through stream class. Pin
Gary Stafford26-Jun-09 2:52
Gary Stafford26-Jun-09 2:52 
QuestionCreate a web page to add couple of fields to ORACLE table Pin
ptr_Electron26-Jun-09 1:20
ptr_Electron26-Jun-09 1:20 
AnswerRe: Create a web page to add couple of fields to ORACLE table Pin
Manas Bhardwaj26-Jun-09 1:28
professionalManas Bhardwaj26-Jun-09 1:28 
AnswerRe: Create a web page to add couple of fields to ORACLE table Pin
padmanabhan N26-Jun-09 1:30
padmanabhan N26-Jun-09 1:30 
AnswerRe: Create a web page to add couple of fields to ORACLE table Pin
Brij26-Jun-09 1:50
mentorBrij26-Jun-09 1:50 
QuestionHow to popup a DIV tag over active-x component Pin
kalyanram26-Jun-09 0:51
kalyanram26-Jun-09 0:51 
AnswerRe: How to popup a DIV tag over active-x component Pin
Enver Maroshi26-Jun-09 1:16
Enver Maroshi26-Jun-09 1:16 
QuestionFCK Editor Insert into Sql table Pin
K030626-Jun-09 0:35
K030626-Jun-09 0:35 
AnswerRe: FCK Editor Insert into Sql table Pin
Christian Graus26-Jun-09 0:36
protectorChristian Graus26-Jun-09 0:36 
GeneralRe: FCK Editor Insert into Sql table Pin
Enver Maroshi26-Jun-09 0:40
Enver Maroshi26-Jun-09 0:40 
GeneralRe: FCK Editor Insert into Sql table Pin
Christian Graus26-Jun-09 0:49
protectorChristian Graus26-Jun-09 0:49 
GeneralRe: FCK Editor Insert into Sql table Pin
Enver Maroshi26-Jun-09 0:57
Enver Maroshi26-Jun-09 0:57 
GeneralRe: FCK Editor Insert into Sql table Pin
Abhijit Jana26-Jun-09 1:27
professionalAbhijit Jana26-Jun-09 1:27 
GeneralRe: FCK Editor Insert into Sql table Pin
Enver Maroshi26-Jun-09 1:32
Enver Maroshi26-Jun-09 1:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.