asp.net query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ashima515
    New Member
    • Nov 2006
    • 40

    asp.net query

    Hi

    I am mailing a HTML page through my ASP.NET page. But in the mail only the text that is before the space is displayed.

    Eg: if in the textbox I write hello world then in the mail only Hello is displayed. I have also increased the maxlength of the property. Why this is happening...... ...

    Pls help

    Regards,
    Ashima
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Please post your code :)

    Comment

    • ashima515
      New Member
      • Nov 2006
      • 40

      #3
      Originally posted by kenobewan
      Please post your code :)
      here's the code m using:

      Dim mymail As New MailMessage()
      mymail.From = senderid.Text
      mymail.To = hodid.Text
      mymail.Subject = "Cancellati on Form"
      mymail.BodyForm at = MailFormat.Html
      Dim myatt As New MailAttachment( "C:/inetpub/wwwroot/ashimaproject/cancelinfo.xml" )
      Dim mail As String
      mail = "<html><bod y><p align=center><f ont face=Arial size=5 color=#008442>< u>Cancellation Form</u></Font></p>" & _
      "<br /><table><tr><td > <label> Employee Name</label></td><td><input type=text value=" + empcode.Text + " /></td></tr>" & _
      " <tr><td><label> Employee Name</label></td><td><input type=text value=" + empname.Text + "/></td></tr>" & _
      "<tr><td><label >Department</label></td> <td><input type=text maxlenght=10 value=" + dept.Text + " /></td></tr> " & _
      "<tr><td><label >Leave Type</label></td><td> <input type=text value=" + type.SelectedIt em.ToString() + " /></td></tr>" & _
      "<tr><td><label >From </label></td><td> <input type=text value= " + fromdate.Text + " / ></td></tr>" & _
      "<tr><td> <label>To </label></td><td> <input type=text value= " + todate.Text + " / ></td></tr> " & _
      "</table>" & _
      "<body></html>"
      mymail.Body = mail
      mymail.Attachme nts.Add(myatt)
      mymail.Priority = MailPriority.Hi gh
      SmtpMail.Send(m ymail)
      Response.Redire ct("thanks.aspx ")

      Comment

      • kenobewan
        Recognized Expert Specialist
        • Dec 2006
        • 4871

        #4
        I have only two small suggestions to try. In your code maxlength is misspelled. Also in the code try using a single quote before and after declaring the value of the input.

        Hope that this helps.

        Comment

        Working...