Reputation: 113
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.
Upvotes: 0
Views: 192
Reputation: 49978
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 DisplayMessage
to lblMsgSend
and see if that fixes it.
Better yet, view the ContactControl.ascx
files and look for the label ID:
<p>
<asp:Label ID="lblMsgSend" runat="server" Visible="false" />
</p>
Upvotes: 1