Monday, 13 May 2013

Find Dynamic Generated Controls from Code Behind C#

We can find the dynamic controls with this code.
Here instead of txtFirstName put your controls ID which you have created dynamically.

string FirstName;
foreach (string key in Request.Params.AllKeys)
       {
                   if (key.Contains("txtFirstName"))
                    {
                        FirstName= Request.Params[key].ToString();
                    }
      }

If any doubt put comment.

No comments:

Post a Comment