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
How 2 access Webcam through .Net
How to create a control in windows application also how could add in the Tool box itself
Doubt on ''createuserwizard'' control?
How to access the DLL that is in GAC
Button control into DataGridView in C#.NET Windows App
Latest Forum Questions From The Same Category
Mail is working but I want send two excel file to each different person
how to display child nodes with headers and keeping the child nodes in a table
In DataGrid I have Two Dropdownlist, One in Header template and Item Template
Display data directly from database table to PDF using stored procedures in asp.net C#
How to install and use Dev Express ?
Dialogbox Custom Control
Custom Control in Winforms
I just started learning c#.net console application
How to read csv file which have many special character and tabs?
USSD using AT COMMAND
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