Click here to Skip to main content
15,909,091 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need to cancel BackgroundWorker Pin
Gerry Schmitz6-Sep-16 9:08
mveGerry Schmitz6-Sep-16 9:08 
GeneralRe: Need to cancel BackgroundWorker Pin
David_416-Sep-16 9:14
David_416-Sep-16 9:14 
GeneralRe: Need to cancel BackgroundWorker Pin
David_416-Sep-16 9:18
David_416-Sep-16 9:18 
GeneralRe: Need to cancel BackgroundWorker Pin
Gerry Schmitz6-Sep-16 9:48
mveGerry Schmitz6-Sep-16 9:48 
GeneralRe: Need to cancel BackgroundWorker Pin
David_416-Sep-16 10:05
David_416-Sep-16 10:05 
GeneralRe: Need to cancel BackgroundWorker Pin
Gerry Schmitz6-Sep-16 10:25
mveGerry Schmitz6-Sep-16 10:25 
QuestionFacebook login form Pin
Launchar31-Aug-16 18:14
Launchar31-Aug-16 18:14 
AnswerRe: Facebook login form Pin
Mycroft Holmes31-Aug-16 19:38
professionalMycroft Holmes31-Aug-16 19:38 
AnswerRe: Facebook login form Pin
Nathan Minier1-Sep-16 0:59
professionalNathan Minier1-Sep-16 0:59 
QuestionPRINT DATE TIME & TEXT ON PICTUREBOX Pin
Member 1271206730-Aug-16 18:11
Member 1271206730-Aug-16 18:11 
AnswerRe: PRINT DATE TIME & TEXT ON PICTUREBOX Pin
Mycroft Holmes30-Aug-16 20:17
professionalMycroft Holmes30-Aug-16 20:17 
QuestionGet value from string and pass it to another field Pin
Member 1105143930-Aug-16 11:50
Member 1105143930-Aug-16 11:50 
AnswerRe: Get value from string and pass it to another field Pin
Simon_Whale30-Aug-16 13:11
Simon_Whale30-Aug-16 13:11 
AnswerRe: Get value from string and pass it to another field Pin
Dave Kreskowiak30-Aug-16 13:17
mveDave Kreskowiak30-Aug-16 13:17 
Questionobject reference not set to an instance of an object Pin
mmiklauz29-Aug-16 6:38
mmiklauz29-Aug-16 6:38 
AnswerRe: object reference not set to an instance of an object Pin
Pete O'Hanlon29-Aug-16 7:23
mvePete O'Hanlon29-Aug-16 7:23 
AnswerRe: object reference not set to an instance of an object PinPopular
OriginalGriff29-Aug-16 8:05
mveOriginalGriff29-Aug-16 8:05 
AnswerRe: object reference not set to an instance of an object Pin
Abhinav S29-Aug-16 18:36
Abhinav S29-Aug-16 18:36 
QuestionHow to show results based on rdo button selected without having to re-access database? Pin
kmllev29-Aug-16 5:10
kmllev29-Aug-16 5:10 
AnswerRe: How to show results based on rdo button selected without having to re-access database? Pin
Gerry Schmitz29-Aug-16 10:21
mveGerry Schmitz29-Aug-16 10:21 
GeneralRe: How to show results based on rdo button selected without having to re-access database? Pin
kmllev29-Aug-16 17:46
kmllev29-Aug-16 17:46 
Question5.5.1 Authentication Required Pin
Member 1270877429-Aug-16 0:34
Member 1270877429-Aug-16 0:34 
C#
try
        {
            MailMessage mail = new MailMessage();


            mail.From = new MailAddress("sami.goswami@gmail.com");
            mail.To.Add(txtto.Text);
            mail.Subject = txtsub.Text;
            mail.Body = txtmsg.Text;

            SmtpClient Smtpserver = new SmtpClient();

            Smtpserver.Credentials = new NetworkCredential("sami.goswami@gmail.com", "password", "smtp.gmail.com");
            Smtpserver.Host = "smtp.gmail.com";
            Smtpserver.Port = 587;
            Smtpserver.DeliveryMethod = SmtpDeliveryMethod.Network;

            Smtpserver.EnableSsl = true;
            Smtpserver.UseDefaultCredentials = false;

            Smtpserver.Send(mail);


            label1.Text = "Email successfully sent";
        }
        catch (Exception ex)
        {
            label1.Text = "Email failed" + ex.Message;
        }



web.config
C#
<pre lang="XML"><configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.5"/>
    <httpRuntime targetFramework="4.5"/>
  
  </system.web>
<system.net>
            <mailSettings>
                <smtp deliveryMethod="Network" from="sami.goswami@gmail.com">
                    <network defaultCredentials="false" host="smtp.gmail.com" port="25" userName="sami.goswami@gmail.com" password="password"/>
                </smtp>
            </mailSettings>
        </system.net>
</configuration>

C#


AnswerRe: 5.5.1 Authentication Required Pin
OriginalGriff29-Aug-16 0:45
mveOriginalGriff29-Aug-16 0:45 
QuestionHow to change background color of RadGridView? Pin
Daniyaltjm28-Aug-16 23:34
Daniyaltjm28-Aug-16 23:34 
AnswerRe: How to change background color of RadGridView? Pin
#realJSOP31-Aug-16 3:26
professional#realJSOP31-Aug-16 3:26 

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.