私はrunat = "Server"を実行すると、rows = "" cols = ""とasp.netが必要ないページにcleEditorを持っていますasp.netコントロールが値またはテキストを取得できません
これを回避するために、FindControlを使用しようとしていましたが、この方法で値を取得できないようです。私はeditor2のIDを持っているのTextAreaを持って
protected void os_submit_Click (object sender, EventArgs e)
{
Control cleEditor = FindControl("editor2");
MailMessage mm = new MailMessage("[email protected]", "[email protected]");
mm.Subject = "Online Signup Checklist";
mm.Body = cleEditor.value; // Trying to grab the value of the textarea
mm.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "127.0.0.1";
smtp.Port = 25;
smtp.Send(mm);
}
:
は、ここに私のコードです。 scense jqueryの後ろでは、これをリッチテキストエディタに変えます。このテキストエリアの値/テキストを取得するにはasp.netが必要です。
私が間違っていることを誰でも見ることができますか?
を、あなたはコードビハインド、期間内のコントロールにアクセスすることはできません。 – Khan
@できることを確かめてください。 –
回答を投稿して削除した人は、それが成功してから再度投稿してください。 –