Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Pls some one tell that how to show data from table on page without using any server control...
Posted
Comments
vinodkumarnie 14-Feb-13 23:34pm    
If you don't want server control means which control you want..? How your data should shown..? Which format...?

If you don't want to use any server control than you can create HTML table at run-time to show table data.



edited by Haris: Caps removed.
 
Share this answer
 
v3
Comments
joe_j 14-Feb-13 8:23am    
please do not use Cap letters, looks rude.
could be of help
display data in html table[^]
 
Share this answer
 
C#
Hi chander_rani,

For perform this task you can use StringBulider class with his append function and write following code

StringBuilder stringBuilder= new StringBuilder();
stringBuilder.Append("<table>");
foreach(DataRow row in (yourtablename).Rows)
{
stringBuilder.Append("<tr>");
  for (int i = 0; i < (yourtablename).Columns.Count; i++)
  {
     stringBuilder.Append("<td>"+row[i]+"</td>");
  }
  stringBuilder.Append("</tr>");

}
stringBuilder.Append("</table>");


try this, it will fulfill your requirement

Best Regards,

Amit Vishwakarma
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900