Click here to Skip to main content
16,008,750 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Read XML file from Web Service Pin
Abhijit Jana22-Mar-09 2:10
professionalAbhijit Jana22-Mar-09 2:10 
GeneralRe: Read XML file from Web Service Pin
slSoftware22-Mar-09 2:15
slSoftware22-Mar-09 2:15 
AnswerRe: Read XML file from Web Service Pin
SeMartens22-Mar-09 3:33
SeMartens22-Mar-09 3:33 
GeneralRe: Read XML file from Web Service Pin
slSoftware22-Mar-09 3:35
slSoftware22-Mar-09 3:35 
GeneralRe: Read XML file from Web Service Pin
SeMartens22-Mar-09 3:42
SeMartens22-Mar-09 3:42 
QuestionProblem with printing Pin
indian2221-Mar-09 22:39
indian2221-Mar-09 22:39 
AnswerRe: Problem with printing Pin
tech60322-Mar-09 4:05
tech60322-Mar-09 4:05 
QuestionFormatting Email's body using MailMessage class Pin
Tina P21-Mar-09 21:56
Tina P21-Mar-09 21:56 
Hello folks,

I'm going to be grabbing pieces of information from a page (webform, various text boxes such as Name, Number, Address etc) and need to put all that stuff together in the form of an email and fire it off to the administrator at admin@email.com.
The problem is how do i set the Body property, coz it only takes string input...since I'll be gathering info from various text boxes, I can't just set the Text property of the textbox to the Body property of teh MailMessage object. I have a feeling I have to do string manipulation here. How do I grab the values from these various text boxes and put 'em all together (perhaps one in each line) for instance like this:

Name: Dillon Edward

Num: 343

Address: 123 Main st.

Here's what I have so far:

MailMessage msg = new MailMessage("abc@yahoo.com", "admin@email.com");
msg.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
msg.Subject = "Attention - There has been a new user that needs to be looked at";
msg.Body =<h2> Name </h2> I guess here I would have to do textBoxName.Text BUT HOW ;
msg.IsBodyHtml = true;

//Instentiating SMTP client
SmtpClient smtp = new SmtpClient();
smtp.Send(msg);
AnswerRe: Formatting Email's body using MailMessage class Pin
Abhijit Jana21-Mar-09 22:29
professionalAbhijit Jana21-Mar-09 22:29 
GeneralRe: Formatting Email's body using MailMessage class Pin
N a v a n e e t h22-Mar-09 5:00
N a v a n e e t h22-Mar-09 5:00 
GeneralRe: Formatting Email's body using MailMessage class Pin
Tina P22-Mar-09 7:52
Tina P22-Mar-09 7:52 
GeneralRe: Formatting Email's body using MailMessage class Pin
N a v a n e e t h22-Mar-09 19:28
N a v a n e e t h22-Mar-09 19:28 
GeneralRe: Formatting Email's body using MailMessage class Pin
Abhijit Jana22-Mar-09 19:30
professionalAbhijit Jana22-Mar-09 19:30 
GeneralRe: Formatting Email's body using MailMessage class Pin
Abhijit Jana22-Mar-09 19:02
professionalAbhijit Jana22-Mar-09 19:02 
GeneralRe: Formatting Email's body using MailMessage class Pin
Tina P24-Mar-09 6:18
Tina P24-Mar-09 6:18 
JokeRe: Formatting Email's body using MailMessage class Pin
Tina P22-Mar-09 7:49
Tina P22-Mar-09 7:49 
QuestionDesign time editable container control Pin
Xmen Real 21-Mar-09 21:22
professional Xmen Real 21-Mar-09 21:22 
QuestionError parser message Pin
kankeyan21-Mar-09 20:24
kankeyan21-Mar-09 20:24 
AnswerRe: Error parser message Pin
Abhijit Jana21-Mar-09 22:33
professionalAbhijit Jana21-Mar-09 22:33 
QuestionHelp? Pin
SIJUTHOMASP21-Mar-09 13:13
professionalSIJUTHOMASP21-Mar-09 13:13 
AnswerRe: Help? Pin
Yusuf21-Mar-09 13:20
Yusuf21-Mar-09 13:20 
GeneralRe: Help? Pin
SIJUTHOMASP21-Mar-09 13:28
professionalSIJUTHOMASP21-Mar-09 13:28 
GeneralRe: Help? Pin
Yusuf22-Mar-09 4:46
Yusuf22-Mar-09 4:46 
QuestionASP .NET 3.5 / C# Training Pin
bdaoust21-Mar-09 10:23
bdaoust21-Mar-09 10:23 
AnswerRe: ASP .NET 3.5 / C# Training Pin
Yusuf21-Mar-09 13:27
Yusuf21-Mar-09 13:27 

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.