HTML Table Cell value
-
Hello, I have placed a html table control on my web page. I wish to fill the rows and columns with dataset's rows and column. Please tell me the easy the faster way to fill the html table with dataset. Dataset is carrying 20 rows and 8 columns. Thanks & Regards Girish Sharma
-
Hello, I have placed a html table control on my web page. I wish to fill the rows and columns with dataset's rows and column. Please tell me the easy the faster way to fill the html table with dataset. Dataset is carrying 20 rows and 8 columns. Thanks & Regards Girish Sharma
The easiest way is go for a GridView control in asp.net 2.0. You can display the dataset content in a tabular format by writing few lines of code. It will also maintain the ViewState between postback. You can also provide the sorting, paging and filter options.
-
Hello, I have placed a html table control on my web page. I wish to fill the rows and columns with dataset's rows and column. Please tell me the easy the faster way to fill the html table with dataset. Dataset is carrying 20 rows and 8 columns. Thanks & Regards Girish Sharma
You can't use a HTML table in the code-behind to bind it to the dataset. You need to set runat="server" attribute to true. You can also use the HTMLTextWrite class to generate the table. Otherwise, you can always use the grid view control with out writing so many lines of code. But it totally depends on the requirement.
Either you love IT or leave IT...
-
The easiest way is go for a GridView control in asp.net 2.0. You can display the dataset content in a tabular format by writing few lines of code. It will also maintain the ViewState between postback. You can also provide the sorting, paging and filter options.
So, finally, i am using GridView control, but one little question more: How do i set column name as per query column; i.e. suppose select query is : select Cname as "Candidate Name" from table1. So i wish to give the column name "Candidate Name" like wise. Thanks & Regards Girish Sharma
-
So, finally, i am using GridView control, but one little question more: How do i set column name as per query column; i.e. suppose select query is : select Cname as "Candidate Name" from table1. So i wish to give the column name "Candidate Name" like wise. Thanks & Regards Girish Sharma