Unable to find control inside a table server control
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
Hi, I have a table server control and its rows are dynamically generated and also in each row I am dynamically adding dropdownlist. But later when I am trying to find the controls inside the table it is showing null. how can i find control inside a table. I am using the code: int cnt; cnt = Table1.Rows.Count; for (int i = 1; i <= cnt; i++) { string strtime; DropDownList ddlh = new DropDownList(); DropDownList ddlm = new DropDownList(); ddlh = (DropDownList)Table1.Rows[i].FindControl("ddlthr"); ddlm = (DropDownList)Table1.Rows[i].FindControl("ddltmin"); }
Thanks & Regards Mishra