Click here to Skip to main content
15,898,134 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionRe: DDL loses its contents at postback [modified] Pin
shahid_isb8529-Jun-07 22:58
shahid_isb8529-Jun-07 22:58 
AnswerRe: DDL loses its contents at postback Pin
Christian Graus30-Jun-07 0:01
protectorChristian Graus30-Jun-07 0:01 
QuestionRe: DDL loses its contents at postback Pin
shahid_isb8530-Jun-07 0:12
shahid_isb8530-Jun-07 0:12 
AnswerRe: DDL loses its contents at postback Pin
Christian Graus30-Jun-07 12:04
protectorChristian Graus30-Jun-07 12:04 
AnswerRe: DDL loses its contents at postback Pin
DavidNohejl30-Jun-07 12:57
DavidNohejl30-Jun-07 12:57 
AnswerRe: DDL loses its contents at postback Pin
DavidNohejl30-Jun-07 13:12
DavidNohejl30-Jun-07 13:12 
QuestionSending the information in Email ID Pin
.NET- India 29-Jun-07 20:41
.NET- India 29-Jun-07 20:41 
AnswerRe: Sending the information in Email ID Pin
Ajai Chaudhary29-Jun-07 21:25
Ajai Chaudhary29-Jun-07 21:25 
Hi Dear

To store values you can use the Database Connectivity the value will stored into sql or access database and to send mail to user you can use theh following code: -

1. To use it you have to import System.Net & System.Net.Mail namespaces.

2. You need to copy the following into web.config file before closing of configuration tag.

<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="<from mail id>">
<network

host="mail.dbmindia.com<host server name>"
userName="<from mail id>"
password="<password>"


port="25"
defaultCredentials="true"
/>

</smtp>

</mailSettings>

</system.net>



3. Use this code in your web page to send the mail to any id.

MailMessage mail1 = new MailMessage();

mail1.From = new MailAddress("<from email id>");
try
{
mail1.To.Add(<to mail id>);
}
catch (Exception mailex)
{
Response.Write("Email id is not in valid form");
Response.Write(mailex.ToString());
}

mail1.Subject = "<Subject for the mail";
mail1.IsBodyHtml = true;
mail1.Body = "<body message>"
SmtpClient smtp = new SmtpClient();
smtp.Credentials = new System.Net.NetworkCredential("<from mail id>", "<from mail id's password>");
try
{
smtp.Send(mail1);
}
catch (Exception ex)
{
Response.Write("Failed to send the mail");
Response.Write(ex.ToString());


}

With Regards

Yogesh Agarwal
QuestionDataBinding Problem Pin
Amr M. K.29-Jun-07 20:32
Amr M. K.29-Jun-07 20:32 
AnswerRe: DataBinding Problem Pin
Bassam Saoud29-Jun-07 21:51
Bassam Saoud29-Jun-07 21:51 
GeneralRe: DataBinding Problem Pin
Amr M. K.29-Jun-07 22:34
Amr M. K.29-Jun-07 22:34 
GeneralRe: DataBinding Problem Pin
Bassam Saoud29-Jun-07 22:41
Bassam Saoud29-Jun-07 22:41 
QuestionRequiredFildValidator in Update panel Pin
Imran Khan Pathan29-Jun-07 20:05
Imran Khan Pathan29-Jun-07 20:05 
Questionxml read / parse resources Pin
firestoper29-Jun-07 19:53
firestoper29-Jun-07 19:53 
AnswerRe: xml read / parse resources Pin
Fred_Smith29-Jun-07 23:17
Fred_Smith29-Jun-07 23:17 
GeneralRe: xml read / parse resources Pin
firestoper1-Jul-07 19:21
firestoper1-Jul-07 19:21 
QuestionDatasets with Crystal reports.. Pin
SrividhyaS29-Jun-07 19:43
SrividhyaS29-Jun-07 19:43 
QuestionGridview Button and Checkbox Control Pin
Sarfaraj Ahmed29-Jun-07 17:43
Sarfaraj Ahmed29-Jun-07 17:43 
QuestionCalling a webservice using WCF? [modified] Pin
moazzamahmed29-Jun-07 16:05
moazzamahmed29-Jun-07 16:05 
QuestionSetting file access restrictions... Pin
dekart_roo29-Jun-07 9:28
dekart_roo29-Jun-07 9:28 
AnswerRe: Setting file access restrictions... Pin
Bassam Saoud29-Jun-07 9:49
Bassam Saoud29-Jun-07 9:49 
GeneralRe: Setting file access restrictions... Pin
dekart_roo29-Jun-07 9:55
dekart_roo29-Jun-07 9:55 
GeneralRe: Setting file access restrictions... Pin
Bassam Saoud29-Jun-07 10:07
Bassam Saoud29-Jun-07 10:07 
QuestionRow index for a link button in a grid Pin
Martin_29-Jun-07 5:08
Martin_29-Jun-07 5:08 
AnswerRe: Row index for a link button in a grid Pin
kubben29-Jun-07 5:43
kubben29-Jun-07 5:43 

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.