Dynamically created textbox values are not displaying in the dynamic Texbox when i click the button
<p>I have created a TextBox dynamically, and i am getting the value of the textbox when i click the button. But the value entered in the dynamic textbox gets empty when i click the button.</p>

<p>Below is my ASPX Code:</p>

<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Reports.WebForm1" %&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head runat="server"&gt;
&lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form id="form1" runat="server"&gt;
&lt;div&gt;

&lt;/div&gt;

&lt;asp:DropDownList ID="DropDownList1" runat="server" 
    onselectedindexchanged="DropDownList1_SelectedIndexChanged" AutoPostBack = "true"&gt;
    &lt;asp:ListItem&gt;Text&lt;/asp:ListItem&gt;
    &lt;asp:ListItem&gt;Check&lt;/asp:ListItem&gt;
&lt;/asp:DropDownList&gt; 

&lt;asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="GetTextBoxValue" /&gt;   
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p><strong>CodeBehind:</strong></p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Reports
{
public partial class WebForm1 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        TextBox TB = new TextBox();
        TB.ID = "abc";
        form1.Controls.Add(TB);
        Response.Write(Request.Form["abc"]);
    }

    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        createcontrol();
    }


    protected void createcontrol()
    {
        if (DropDownList1.SelectedValue.ToLower().Trim() == "text")
        {
            TextBox TB = new TextBox();
            TB.ID = "abc";
            form1.Controls.Add(TB);
        }
    }
}
}
</code></pre>
