asp.net - A panel scrollbars doesn't work with a label content -


i trying put label control within panel control. panel control supposed enable user scroll down when label content grows bigger panel capacity.

<%@ 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> 

the asp:panel warps text div, not have specify height panel, height fit height of data, , thats why not see scroll bar div.

if set both height , width see scroll bar.

for example

<asp:panel id="panel1" runat="server" borderstyle="none"        scrollbars="vertical" height="80px" width="180px"> 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -