Subscribe

RSS Feed (xml)

Creating a Scrolling Table within a Web Form in ASP.NET

Using Cascading Style Sheets, it is simple to create a scrolling region inside a Web Form.
In the ASPX page:
<table border=”1” bgcolor=”#EEEEEE”>
<tr>
<td>Query Results:</td>
<td><div style=”overflow-y:scroll; height=40;”>
<table bgcolor=”#FFFFFF”>
<tr bgcolor=”#CCCCCC”>
<td>First Name</td><td>Last Name</td>
</tr>
<tr>
<td>Steve</td><td>Smith</td>
</tr>
<tr>
<td>Rob</td><td>Howard</td>
</tr>
<tr>
<td>ASPAlliance</td><td>Team</td>
</tr>
</table>
</div>
</td>
</tr>
</table>

This technique is not supported by all browsers, but will work with Internet Explorer
4.0 and later and should work with Netscape 6.0 and later. The overflow property has a

number of options that you can set that many ASP.NET developers are unaware of.
These options can provide very powerful benefits for your Web Form presentation.

No comments:

Variety in the Web World