Some problem about generate html element with Respons.Write

  • Thread starter Thread starter vvkl
  • Start date Start date
V

vvkl

Hello!

I want to Draw a table by Response.Write() method.
I've already laied tables in page, but I don't know how to wirte my new
table into a page's table which I needed in coding.

How should I do?

Thank you!
 
the problem with 'Response.Write' is the layout. You should use a literal
control.

Regards
daniel #
 
Do you absolutely have to output with Response.Write() ? Why not to have the
table in the .aspx page layout?
 
May be my depiction is confused.
I've laied out the page by dreamware.
Now, there is a location in page where I need draw a table by running code.
For example:
<table>
<tr>
<td>Drawing different table in this cell by C# code every
times.</td>
<td></td>
</tr>
</table>

Eliyahu Goldin said:
Do you absolutely have to output with Response.Write() ? Why not to have
the table in the .aspx page layout?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


vvkl said:
Hello!

I want to Draw a table by Response.Write() method.
I've already laied tables in page, but I don't know how to wirte my new
table into a page's table which I needed in coding.

How should I do?

Thank you!
 
The way of doing this in asp.net is to place a server-side control capable
of producing tables to the cell where you want the table to be. Typically
you would databind the control to populate it from a database or other data
sources. Often but not always you wouldn't even have to write a single line
of code. You can rather setup things in a declarative manner. A common
server control that produces a table is GridView. There are also other,
depending on your needs and skills.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


vvkl said:
May be my depiction is confused.
I've laied out the page by dreamware.
Now, there is a location in page where I need draw a table by running
code.
For example:
<table>
<tr>
<td>Drawing different table in this cell by C# code every
times.</td>
<td></td>
</tr>
</table>

Eliyahu Goldin said:
Do you absolutely have to output with Response.Write() ? Why not to have
the table in the .aspx page layout?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


vvkl said:
Hello!

I want to Draw a table by Response.Write() method.
I've already laied tables in page, but I don't know how to wirte my new
table into a page's table which I needed in coding.

How should I do?

Thank you!
 
Back
Top