Author: puggs | Posted on: 11/29/2008 10:29:57 PM | Views : 539

I have a method that creates a few TextBox controls dynamically (on a postback). Sample code:
private void Method1()
{
pnl.Controls.Add(RenderTextBox());
}

private TextBox RenderTextBox()
{
TextBox tb = new TextBox()
td.ID = "txtTestTxt0";
return tb;
}

I seem unable to get the value of "txtTestTxt0".  This is how i am attempting to get the value (please note that I am using a master page):
string myval = "";

if (Master.FindControl("cpn1").FindControls("txtTestTxt0") != null)
{
TextBox tb = (TextBox)Master.FindControl("cpn1").Fi ...

Go to the complete details ...