Below is the code. Where it says “DisplayMessage” is where I have a problem.
protected void btnSend_Click(object sender, EventArgs e)
{
SendMail();
DisplayMessage.Text = "Thank you for the comment! Please hit the 'Return to Main Page' to return to the Main Page!";
DisplayMessage.Visible = true;
txtPhone.Text = "";
txtEmail.Text = "";
txtName.Text = "";
txtComment.Text = "";
}
Am I missing a resource of some sort? Here’s what I’m using at the moment.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
Thanks in advance.
It looks like you downloaded this code from codeproject. The example on the main page doesnt appear to line up with the code in the actual solution. Try changing
DisplayMessagetolblMsgSendand see if that fixes it.Better yet, view the
ContactControl.ascxfiles and look for the label ID: