B
Bishoy George
I have a form to mail by C#, and it works properly.
My problem is: when any visitor writes letters other than English
letters --- it comes as ??????
How to fix this encoding problem?
--------------------------- my code-----------------------------
using System.Web.Mail;
private void btnSend_Click(object sender, System.EventArgs e)
{
MailMessage msg = new MailMessage();
msg.From = txtName.Text + "<" + txtEmail.Text + ">";
msg.To = "(e-mail address removed)";
msg.Subject = "bishoy.com: " + txtSubject.Text;
msg.Body = txtMessage.Text;
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(msg);
lblThanks.Text = "Thank you " + txtName.Text + " your message has been
sent successfully.";
txtName.Text = "";
txtEmail.Text = "";
txtSubject.Text = "";
txtMessage.Text = "";
}
My problem is: when any visitor writes letters other than English
letters --- it comes as ??????
How to fix this encoding problem?
--------------------------- my code-----------------------------
using System.Web.Mail;
private void btnSend_Click(object sender, System.EventArgs e)
{
MailMessage msg = new MailMessage();
msg.From = txtName.Text + "<" + txtEmail.Text + ">";
msg.To = "(e-mail address removed)";
msg.Subject = "bishoy.com: " + txtSubject.Text;
msg.Body = txtMessage.Text;
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(msg);
lblThanks.Text = "Thank you " + txtName.Text + " your message has been
sent successfully.";
txtName.Text = "";
txtEmail.Text = "";
txtSubject.Text = "";
txtMessage.Text = "";
}