Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
cannot access runtime control
November 11, 2009
pls help me sir,
in my project i want to create table of controls at runtime, so i use the method given below
public void createcontrol(int id)
TableRow r = new TableRow();
TableCell d = new TableCell();
Label empname = new Label();
empname.ID = "empname" + id.ToString();
TableCell c = new TableCell();
TextBox openingbalance = new TextBox();
openingbalance.ID = "openingbalance" + id.ToString();
so in each row the id of each control will be change, ie id of the label empname like, empname0, empname1, etc.
here i have a problem like i'm not able to access these controls,i want to access each controls seperately, i hope think we can access the controls based on control id. But here it is not recognized.
what will i do sir,
please help me sir.............
Posted Date: November 11, 2009 Points: 5
Loop Thru the page to get the desired control to get the dynamically generated control value..
Mark As Answer
" if this post help you.
To post reply
Related Questions Related Questions
error in runtime control creation
How to access Master Page control from another web form
How to access the control in the master page from a child page?
Add dynamic FileUpload Control at runtime in asp.net
What is Code Access Security in .NET
Latest Forum Questions From The Same Category
Delete Row and Select Next Record in DatagridView
How to take backup and restore of local database?
How to reduce size of PPT file generated form OpenXML
how to pass parameter
COM object that has been separated from its underlying RCW cannot be used. in C#.net
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend