VisualStudio doesn't create attribute in codebehind for <asp:tablecell>

G

Gürkan Demirci

Hi,

i am using the VisualStudio FormDesigner to create an asp:table.
I want to populate an asp:tablecell with different controls at runtime.
In the codebehind file, there is an attribute for the asp:table. I can use
this to
access the tablerow and tablecell objects. It would be more convenient to
access a tablecell through
a class-attribute. Why is VisualStudio not creating an attribute for
tablerow or tablecell ?

regards,

guerkan
 
V

Victor Garcia Aprea [MVP]

Do you mean the protected member variable right? The behaviour you're
looking for is in the HTML Table (look in the Toolbox for HTML controls not
Web Forms tabs), creating such a table will create the corresponding HTML
markup, you can then right click on the table itself or any cell and select
"Run As Server Control", this will cause VS.NET to add a runat='server'
attribute to the corresponding markup and create a matching member variable
in your codebehind file for the table or cell.

Does this help?

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Read my weblog:
Followers of the IHttpHandler
http://clariusconsulting.net/vga
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top