Click here to Skip to main content
16,016,759 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionhow to remove time in gridview & details view when te data is bind through code Pin
avinash8621-Dec-08 7:29
avinash8621-Dec-08 7:29 
AnswerRe: how to remove time in gridview & details view when te data is bind through code Pin
Christian Graus21-Dec-08 8:57
protectorChristian Graus21-Dec-08 8:57 
AnswerRe: how to remove time in gridview & details view when te data is bind through code Pin
Abhijit Jana21-Dec-08 17:47
professionalAbhijit Jana21-Dec-08 17:47 
QuestionSending email from asp.net page User never receive sended email Pin
Rameez Raja21-Dec-08 1:04
Rameez Raja21-Dec-08 1:04 
AnswerRe: Sending email from asp.net page User never receive sended email Pin
Abhijit Jana21-Dec-08 1:12
professionalAbhijit Jana21-Dec-08 1:12 
GeneralRe: Sending email from asp.net page User never receive sended email Pin
Rameez Raja21-Dec-08 1:33
Rameez Raja21-Dec-08 1:33 
GeneralRe: Sending email from asp.net page User never receive sended email Pin
Abhijit Jana21-Dec-08 2:00
professionalAbhijit Jana21-Dec-08 2:00 
GeneralRe: Sending email from asp.net page User never receive sended email Pin
Rameez Raja21-Dec-08 2:13
Rameez Raja21-Dec-08 2:13 
Thanks Abhijit for reply ,

Here is the webconfig setting for my Page
<appSettings> 
<add key="MyMailServer" value="localhost"/>

<add key="MyMailServerPort" value ="25"/> 
</appSettings>


and here is send button click code

Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click

        'send message

        Dim strMsg As String
        strMsg = txtMessage.Text

        mTo = Trim(txtTo.Text)
        mFrom = Trim(txtFrom.Text)
        mSubject = Trim(txtSubject.Text)
        mMsg = Trim(txtMessage.Text)
        mMailServer = ConfigurationManager.AppSettings.Get("MyMailServer")
        mPort = ConfigurationManager.AppSettings.Get("MyMailServerPort")
        mCC = Trim(txtCC.Text)

        Try

            Dim message As New MailMessage(mFrom, mTo, mSubject, mMsg)

            If fileAttachments.HasFile Then
                Dim attached As New Attachment(Trim(fileAttachments.PostedFile.FileName.ToString()))
                message.Attachments.Add(attached)
            End If

            If mCC <> "" Or mCC <> String.Empty Then
                Dim strCC() As String = Split(mCC, ";")
                Dim strThisCC As String
                For Each strThisCC In strCC
                    message.CC.Add(Trim(strThisCC))
                Next
            End If


            Dim mySmtpClient As New SmtpClient(mMailServer, mPort)
            mySmtpClient.UseDefaultCredentials = True
            mySmtpClient.Send(message)

            MessageBox("The mail message has been sent to " & message.To.ToString())

        Catch ex As FormatException

            MessageBox("Format Exception: " & ex.Message)

        Catch ex As SmtpException

            MessageBox("SMTP Exception:  " & ex.Message)

        Catch ex As Exception

            MessageBox("General Exception:  " & ex.Message)

        End Try

    End Sub




Best Regards
Rameez
GeneralRe: Sending email from asp.net page User never receive sended email Pin
Not Active21-Dec-08 2:51
mentorNot Active21-Dec-08 2:51 
GeneralRe: Sending email from asp.net page User never receive sended email Pin
Abhijit Jana21-Dec-08 17:21
professionalAbhijit Jana21-Dec-08 17:21 
GeneralRe: Sending email from asp.net page User never receive sended email Pin
Rameez Raja21-Dec-08 18:04
Rameez Raja21-Dec-08 18:04 
AnswerRe: Sending email from asp.net page User never receive sended email Pin
Abhijit Jana21-Dec-08 19:00
professionalAbhijit Jana21-Dec-08 19:00 
AnswerRe: Sending email from asp.net page User never receive sended email Pin
Parwej Ahamad21-Dec-08 5:37
professionalParwej Ahamad21-Dec-08 5:37 
QuestionDeployment Troubles Pin
Muhammad Gouda21-Dec-08 0:04
Muhammad Gouda21-Dec-08 0:04 
AnswerRe: Deployment Troubles Pin
Abhijit Jana21-Dec-08 1:26
professionalAbhijit Jana21-Dec-08 1:26 
QuestionHow can I make Help file for my web application in ASP.NET n C#? Pin
Ravi Munde20-Dec-08 22:31
Ravi Munde20-Dec-08 22:31 
AnswerRe: How can I make Help file for my web application in ASP.NET n C#? Pin
Christian Graus20-Dec-08 22:55
protectorChristian Graus20-Dec-08 22:55 
AnswerRe: How can I make Help file for my web application in ASP.NET n C#? Pin
Abhijit Jana21-Dec-08 1:30
professionalAbhijit Jana21-Dec-08 1:30 
AnswerRe: How can I make Help file for my web application in ASP.NET n C#? Pin
Not Active21-Dec-08 2:58
mentorNot Active21-Dec-08 2:58 
QuestionSettings a webusercontrol object's property Pin
TheFM23420-Dec-08 21:27
TheFM23420-Dec-08 21:27 
AnswerRe: Settings a webusercontrol object's property Pin
Christian Graus20-Dec-08 22:56
protectorChristian Graus20-Dec-08 22:56 
QuestionHow i can undrestand a client user is exited from Web Application? Pin
Saba0220-Dec-08 21:21
Saba0220-Dec-08 21:21 
AnswerRe: How i can undrestand a client user is exited from Web Application? Pin
Christian Graus20-Dec-08 22:59
protectorChristian Graus20-Dec-08 22:59 
AnswerRe: How i can undrestand a client user is exited from Web Application? Pin
Muhammad Gouda20-Dec-08 23:01
Muhammad Gouda20-Dec-08 23:01 
GeneralRe: How i can undrestand a client user is exited from Web Application? Pin
Christian Graus20-Dec-08 23:05
protectorChristian Graus20-Dec-08 23:05 

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.