我正在尝试将 Label 控件放在面板控件中。当标签内容增长大于面板容量时,面板控件应该允许用户向下滚动。
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EventReviewPage.aspx.cs"
Inherits="EventReviewPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="Event Log: "></asp:Label>
</td>
<td>
<asp:TextBox ID="txtLog" runat="server"></asp:TextBox>
</td>
<td>
<asp:CheckBox ID="chkAll" runat="server" OnCheckedChanged="chkAll_CheckedChanged"
AutoPostBack="True" />
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label2" runat="server" Text="Source: "></asp:Label>
</td>
<td>
<asp:TextBox ID="txtSource" runat="server"></asp:TextBox>
</td>
</tr>
</table>
</div>
<div>
<asp:Button ID="cmdGet" runat="server" Text="Get Records" OnClick="cmdGet_Click" />
</div>
<asp:Panel ID="Panel1" runat="server" BorderStyle="None" ScrollBars="Vertical">
<asp:Label ID="lblResult" runat="server" Text=""></asp:Label>
</asp:Panel>
</form>
</body>
</html>