Author: dpkbahuguna | Posted on: 6/9/2009 3:28:21 AM | Views : 445

 hello friends,
    I am looking for sending any server control in mail ..but I am getting the Error which is:
    Control 'TextBox1' of type 'TextBox' must be placed inside a form tag with runat=server.

   this is CODE BEHIND:
    protected void Page_Load(object sender, EventArgs e)
    {

        TextBox1.Text = "Finishing";
        StringBuilder SB = new StringBuilder();
        StringWriter SW = new StringWriter(SB);
        HtmlTextWriter HTW = new HtmlTextWriter(SW);
        TextBox1.RenderControl(HTW); 
    }
  this is ASPX page.
   <body>
       < ...

Go to the complete details ...