R
Richard Dixson
I created a new C# web application. Basically all I am trying to do is
create a table that consists of a few rows with two columns in each. And
then to set those columns to text values from my code behind. However I am
not able to do this at all, I am going about this wrong, I think and need
guideance.
If this was just straight HTML I would do this:
<table>
<tr><td>field 1</td><td>value 1 set by code behind</td></tr>
<tr><td>field 2</td><td>value 2 set by code behind</td></tr>
</table>
I dragged a Table object from the Webform control box onto my page. Then I
used the "..." in the properties to create some rows and columns.
But what I cannot figure out is how to set the columns from my code behind
page to text values I want displayed. I can't even figure out how to
reference the columns. I could reference the Table object from code behind,
but wasn't sure how to get at the rows or columns. Do I need to create text
label objects inside the column objects? How am I supposed to access these
columns via code behind?
I searched around and all I found was indepth info on data grid table
display. But this should be much simplier. I'm just trying to create a
static table (do not need to create rows/columns on the fly) that I can set
the columns to values at run time from code behind.
Can someone please advise? A tiny code sample would help best. Thanks!
Richard
create a table that consists of a few rows with two columns in each. And
then to set those columns to text values from my code behind. However I am
not able to do this at all, I am going about this wrong, I think and need
guideance.
If this was just straight HTML I would do this:
<table>
<tr><td>field 1</td><td>value 1 set by code behind</td></tr>
<tr><td>field 2</td><td>value 2 set by code behind</td></tr>
</table>
I dragged a Table object from the Webform control box onto my page. Then I
used the "..." in the properties to create some rows and columns.
But what I cannot figure out is how to set the columns from my code behind
page to text values I want displayed. I can't even figure out how to
reference the columns. I could reference the Table object from code behind,
but wasn't sure how to get at the rows or columns. Do I need to create text
label objects inside the column objects? How am I supposed to access these
columns via code behind?
I searched around and all I found was indepth info on data grid table
display. But this should be much simplier. I'm just trying to create a
static table (do not need to create rows/columns on the fly) that I can set
the columns to values at run time from code behind.
Can someone please advise? A tiny code sample would help best. Thanks!
Richard