0

以下はコードです。「DisplayMessage」と表示されているところに問題があります。

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 = "";
    }

何らかのリソースが不足していますか? これが私が現時点で使用しているものです。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;

前もって感謝します。

4

1 に答える 1

1

このコードはcodeprojectからダウンロードしたようです。メイン ページの例は、実際のソリューションのコードとは一致していないようです。に変更DisplayMessageしてみてlblMsgSend、問題が解決するかどうかを確認してください。

さらに良いことに、ContactControl.ascxファイルを表示してラベル ID を探します。

<p>
    <asp:Label ID="lblMsgSend" runat="server" Visible="false" />
</p>
于 2013-01-30T21:54:16.943 に答える