problem with table size

Hello
i have the code below to paste data from db to page :
int counter=dataSet11.Tables["web"].Rows.Count;

Response.Write("<center><table border=1 width=120>");

for (int t=0 ;t<counter;t++)

{

Response.Write("<tr><td width=120>");

string temp = dataSet11.Tables["web"].Rows[t]["text"].ToString();

Response.Write(temp);

Response.Write("</td></tr>");

}

Response.Write("</table></center>");

The size of generated table in the page is not fixed and vary with texts.
how can i fix the table size? i want the text be cuted to new line when it
is bigger than "120" pixel. but it seems the table original size enlarging
for long texts without /n between.

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!