Emailing a form in C# having trouble
This code has been really frustrating me.  I just cannot figure out where I am going wrong.  I am working with VB.  I am trying to make a request form for the users of my website that they can fill out with there name, emails, comments and an attachment and when the press submit have it sent to me.  I think I am pretty close in figuring It out, but I just cannot get it to work.  Any advice would be great appropriated here is the code. 

    protected void Submit_Click1(object sender, EventArgs e)
        {
            string strUpLoadDateTime = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            string strFileName1 = string.Empty;

            if ((File1.PostedFile != null) && (File1.PostedFile.ContentLength > 0))
            {

                string strUploadFileName1 = File1.PostedFile.FileName;
                strFileName1 = strUpLoadDateTime + "." +
                                System.IO.Path.GetFileNameWithoutExtension(strUploadFileName1) +
                                Path.GetExtension(strUploadFileName1);
                strFileName1 = strFileName1.Replace("'", "");
                string strSaveLocation = Server.MapPath("Upload") + "\\" + strFileName1;
                File1.PostedFile.SaveAs(strSaveLocation);
                txtComments.Text = "The file has been uploaded now please leave a comment";
            }


            try
            {


               
                System.Text.StringBuilder sb = new System.Text.StringBuilder();

                sb.AppendFormat("Bug Name: {0},<br/>", txtBugName.Text.Trim());
                sb.AppendFormat("Module Name: {0}<br/>", ddlModule.SelectedValue);
                sb.AppendFormat("Page Name: {0}<br/>", ddlPage.SelectedValue);
                sb.AppendFormat("Description: {0}<br/>", txtComments.Text.Trim());
                sb.AppendFormat("Email is: {0}<br/>", txtemail.Text.Trim());




                SendMessage(ConfigurationManager.AppSettings["EmailAddrTo"],
                    ConfigurationManager.AppSettings["EmailAddrFrom"],
                    txtBugName.Text.Trim(),
                    sb.ToString(), "", "");
            }
            catch (Exception) { };

        }


    private string SendMessage(string strTo, string strFrom, string strSubject, string strMessage, string strAttachment, string strBCC)
        {

           try
            {
                MailMessage mailMsg;
                string strEmail = "";
                string strSmtpClient = ConfigurationManager.AppSettings["SmtpClient"];
                string[] arrEmailAddress = strTo.Split(';');
                for (int intCtr = 0; intCtr < arrEmailAddress.Length; intCtr++)
                {
                    strEmail = "";
                    if (arrEmailAddress[intCtr].ToString().Trim() != "")
                    {
                        strEmail = arrEmailAddress[intCtr].ToString().Trim();
                        mailMsg = new MailMessage(strFrom, strEmail, strSubject, strMessage);
                        mailMsg.IsBodyHtml = true;
                        if (!string.IsNullOrWhiteSpace(strBCC))  //(!strBCC.Trim().Equals(string.Empty))
                            mailMsg.Bcc.Add(strBCC);

                        var attachment = new Attachment(strAttachment);

                        ContentDisposition disposition = attachment.ContentDisposition;
                        disposition.CreationDate = System.IO.File.GetCreationTime(strAttachment);
                        disposition.ModificationDate = System.IO.File.GetLastWriteTime(strAttachment);
                        disposition.ReadDate = System.IO.File.GetLastAccessTime(strAttachment);
                        mailMsg.Attachments.Add(attachment);


                        SmtpClient smtpClient = new SmtpClient(strSmtpClient);
                        smtpClient.UseDefaultCredentials = true;
                        smtpClient.Port = 25;

                        smtpClient.Send(mailMsg);
                        mailMsg.Dispose();
                    }
                }

                return "Message sent to " + strTo + " at " + DateTime.Now.ToString() + ".";

            }
            catch (Exception objEx)
            {
                return objEx.Message.ToString();
            }


These last parts are working thank god, but I just wanted to show you guys the full code

    protected void ddlModule_SelectedIndexChanged1(object sender, EventArgs e)
        {
            ddlPage.Items.Clear();

            ddlPage.Items.Add(new ListItem("   - Select -   ", ""));
            if (ddlModule.SelectedValue.Trim().Equals(""))
            {
            }
            else if (ddlModule.SelectedValue.Trim().Equals("Underwriting"))
            {
                ddlPage.Items.Add("UW Page 1");
                ddlPage.Items.Add("UW Page 1");
            }
            else if (ddlModule.SelectedValue.Trim().Equals("Resellers"))
            {
                ddlPage.Items.Add("Resellers Page 1");
                ddlPage.Items.Add("Resellers Page 1");
            }
            else if (ddlModule.SelectedValue.Trim().Equals("Merchants"))
            {
                ddlPage.Items.Add("Merchants Page 1");
                ddlPage.Items.Add("Merchants Page 1");
            }
            else if (ddlModule.SelectedValue.Trim().Equals("Reports"))
            {
                ddlPage.Items.Add("Reports Page 1");
                ddlPage.Items.Add("Reports Page 1");
            }
            else if (ddlModule.SelectedValue.Trim().Equals("Admin"))
            {
                ddlPage.Items.Add("Admin Page 1");
                ddlPage.Items.Add("Admin Page 1");
            }
            else if (ddlModule.SelectedValue.Trim().Equals("Refi"))
            {
                ddlPage.Items.Add("Refi Page 1");
                ddlPage.Items.Add("Refi Page 1");
            }
            else if (ddlModule.SelectedValue.Trim().Equals("Retention"))
            {
                ddlPage.Items.Add("Retention Page 1");
                ddlPage.Items.Add("Retention Page 1");
            }
           

        }

      

        protected void Cancel_Click(object sender, EventArgs e)
        {
            txtBugName.Text = "";
            ddlModule.SelectedValue = "";
            ddlPage.SelectedValue = "";
            txtComments.Text = "";
            txtemail.Text = "";
        }

What Am I doing wrong I feel as if I am so close, but yet so far.

Thank you 
Emailing a form in C# having trouble
===

This code has been really frustrating me.  I just cannot figure out where I am going wrong.  I am working with VB.  I am trying to make a request form for the users of my website that they can fill out with there name, emails, comments and an attachment and when the press submit have it sent to me.  I think I am pretty close in figuring It out, but I just cannot get it to work.  Any advice would be great appropriated here is the code. 

    protected void Submit_Click1(object sender, EventArgs e)
        {
            string strUpLoadDateTime = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            string strFileName1 = string.Empty;

            if ((File1.PostedFile != null) && (File1.PostedFile.ContentLength > 0))
            {

                string strUploadFileName1 = File1.PostedFile.FileName;
                strFileName1 = strUpLoadDateTime + "." +
                                System.IO.Path.GetFileNameWithoutExtension(strUploadFileName1) +
                                Path.GetExtension(strUploadFileName1);
                strFileName1 = strFileName1.Replace("'", "");
                string strSaveLocation = Server.MapPath("Upload") + "\\" + strFileName1;
                File1.PostedFile.SaveAs(strSaveLocation);
                txtComments.Text = "The file has been uploaded now please leave a comment";
            }


            try
            {


               
                System.Text.StringBuilder sb = new System.Text.StringBuilder();

                sb.AppendFormat("Bug Name: {0},<br/>", txtBugName.Text.Trim());
                sb.AppendFormat("Module Name: {0}<br/>", ddlModule.SelectedValue);
                sb.AppendFormat("Page Name: {0}<br/>", ddlPage.SelectedValue);
                sb.AppendFormat("Description: {0}<br/>", txtComments.Text.Trim());
                sb.AppendFormat("Email is: {0}<br/>", txtemail.Text.Trim());




                SendMessage(ConfigurationManager.AppSettings["EmailAddrTo"],
                    ConfigurationManager.AppSettings["EmailAddrFrom"],
                    txtBugName.Text.Trim(),
                    sb.ToString(), "", "");
            }
            catch (Exception) { };

        }


    private string SendMessage(string strTo, string strFrom, string strSubject, string strMessage, string strAttachment, string strBCC)
        {

           try
            {
                MailMessage mailMsg;
                string strEmail = "";
                string strSmtpClient = ConfigurationManager.AppSettings["SmtpClient"];
                string[] arrEmailAddress = strTo.Split(';');
                for (int intCtr = 0; intCtr < arrEmailAddress.Length; intCtr++)
                {
                    strEmail = "";
                    if (arrEmailAddress[intCtr].ToString().Trim() != "")
                    {
                        strEmail = arrEmailAddress[intCtr].ToString().Trim();
                        mailMsg = new MailMessage(strFrom, strEmail, strSubject, strMessage);
                        mailMsg.IsBodyHtml = true;
                        if (!string.IsNullOrWhiteSpace(strBCC))  //(!strBCC.Trim().Equals(string.Empty))
                            mailMsg.Bcc.Add(strBCC);

                        var attachment = new Attachment(strAttachment);

                        ContentDisposition disposition = attachment.ContentDisposition;
                        disposition.CreationDate = System.IO.File.GetCreationTime(strAttachment);
                        disposition.ModificationDate = System.IO.File.GetLastWriteTime(strAttachment);
                        disposition.ReadDate = System.IO.File.GetLastAccessTime(strAttachment);
                        mailMsg.Attachments.Add(attachment);


                        SmtpClient smtpClient = new SmtpClient(strSmtpClient);
                        smtpClient.UseDefaultCredentials = true;
                        smtpClient.Port = 25;

                        smtpClient.Send(mailMsg);
                        mailMsg.Dispose();
                    }
                }

                return "Message sent to " + strTo + " at " + DateTime.Now.ToString() + ".";

            }
            catch (Exception objEx)
            {
                return objEx.Message.ToString();
            }


These last parts are working thank god, but I just wanted to show you guys the full code

    protected void ddlModule_SelectedIndexChanged1(object sender, EventArgs e)
        {
            ddlPage.Items.Clear();

            ddlPage.Items.Add(new ListItem("   - Select -   ", ""));
            if (ddlModule.SelectedValue.Trim().Equals(""))
            {
            }
            else if (ddlModule.SelectedValue.Trim().Equals("Underwriting"))
            {
                ddlPage.Items.Add("UW Page 1");
                ddlPage.Items.Add("UW Page 1");
            }
            else if (ddlModule.SelectedValue.Trim().Equals("Resellers"))
            {
                ddlPage.Items.Add("Resellers Page 1");
                ddlPage.Items.Add("Resellers Page 1");
            }
            else if (ddlModule.SelectedValue.Trim().Equals("Merchants"))
            {
                ddlPage.Items.Add("Merchants Page 1");
                ddlPage.Items.Add("Merchants Page 1");
            }
            else if (ddlModule.SelectedValue.Trim().Equals("Reports"))
            {
                ddlPage.Items.Add("Reports Page 1");
                ddlPage.Items.Add("Reports Page 1");
            }
            else if (ddlModule.SelectedValue.Trim().Equals("Admin"))
            {
                ddlPage.Items.Add("Admin Page 1");
                ddlPage.Items.Add("Admin Page 1");
            }
            else if (ddlModule.SelectedValue.Trim().Equals("Refi"))
            {
                ddlPage.Items.Add("Refi Page 1");
                ddlPage.Items.Add("Refi Page 1");
            }
            else if (ddlModule.SelectedValue.Trim().Equals("Retention"))
            {
                ddlPage.Items.Add("Retention Page 1");
                ddlPage.Items.Add("Retention Page 1");
            }
           

        }

      

        protected void Cancel_Click(object sender, EventArgs e)
        {
            txtBugName.Text = "";
            ddlModule.SelectedValue = "";
            ddlPage.SelectedValue = "";
            txtComments.Text = "";
            txtemail.Text = "";
        }

What Am I doing wrong I feel as if I am so close, but yet so far.

Thank you 