Asp. netpanel
This article is a solution to solve the problem that the panel scroll bar does not automatically return to the top after the asp.net page button clicks the trigger event. After an event is triggered on the page, the panel scroll bar returns to the top again, the following work needs to be pulled down every time. this problem is a headache especially when TreeView is selected. maintainScrollPositionOnPostBack = true.
The principle is to save the position of the panel scroll bar when you click it, and re-assign a value when loading the page after the page trigger event is complete. Make sure that all buttons and other Click events are saved on the page.
Steps:
1. Script
<Head runat = "server"> <title> asp.net page trigger event panel scroll bar height unchanged </title> <link href = "Css/style.css" type = "text/css" rel = "stylesheet"/> <script type = "text/javascript"> function setPanelScroll () {document. getElementById ('denden1 '). value = document. getElementById ('panel1 '). scrollTop ;}</script>
2. body
Copy codeThe Code is as follows:
<Body onclick = "setPanelScroll ()">
3. assign values
Copy codeThe Code is as follows:
Function ViewObj () {document. getElementById ('panel1'). scrollTop = document. getElementById ('hidden1'). value;} window. onload = ViewObj;
Why can't horizontal scroll bars appear on the aspnet page I wrote ?? Urgent
Because your width is a percentage, you can change it to a fixed px value.
For example:
<Div style = "width: 100%"> </div>
Changed:
<Div style = "width: 990px"> </div>
Reference: www.bjzero.net
Aspnet panel and scroll bar
First, fix the page size, and then set the Attribute overflow to the default value, for example, style = "height: 420px; overflow: auto"