G
Guest
Using VisualStudio 2005, asp.net 2.0:
What do I put in my Web.Config to avoid hard coding the: myserveraddress.com?
The following shows how I have hard coded it without having the value in the
we.config, and it works. However, I would like to place it in my web.config
file, and then just get the value from the web.config?
Can someone tell me what I need to add to the web.config
//send the message
System.Net.Mail.SmtpClient smtp = new
System.Net.Mail.SmtpClient("smtp.myserveraddress.com");
smtp.Send(mail);
What do I put in my Web.Config to avoid hard coding the: myserveraddress.com?
The following shows how I have hard coded it without having the value in the
we.config, and it works. However, I would like to place it in my web.config
file, and then just get the value from the web.config?
Can someone tell me what I need to add to the web.config
//send the message
System.Net.Mail.SmtpClient smtp = new
System.Net.Mail.SmtpClient("smtp.myserveraddress.com");
smtp.Send(mail);