How do I reference the input of an HTML <textarea> control in codebehind?

后端 未结 5 1225
悲哀的现实
悲哀的现实 2020-12-15 14:53

I\'m using a textarea control to allow the user to input text and then place that text into the body of an e-mail. In the code behind, what is the syntax for referencing the

5条回答
  •  青春惊慌失措
    2020-12-15 15:32

    You are not using a .NET control for your text area. Either add runat="server" to the HTML TextArea control or use a .NET control:

    Try this:

    
    

    Then reference it in your codebehind:

    message.Body = TextArea1.Text;
    

提交回复
热议问题