Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
42943 Points
7024 Posts
MVP
May 08, 2012 09:53 AM|LINK
Hello,
Simply set the position:fixed for the button. See the sample app I created for you
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %> <!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 id="Head1" runat="server"> </head> <body> <form id="form1" runat="server"> <div style="position: fixed"> <asp:Button ID="Button1" runat="server" Text="Button" /> </div> <div style="width: 200px; height: 1200px; background-color: Red"> <div> </div> </div> </form> </body> </html>
Please 'Mark as Answer' if this post helps you.
Ruchira
All-Star
42943 Points
7024 Posts
MVP
Re: Split My Page Into 2 parts (Scrolled Part and Fixed Part with no Scrolling)
May 08, 2012 09:53 AM|LINK
Hello,
Simply set the position:fixed for the button. See the sample app I created for you
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %> <!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 id="Head1" runat="server"> </head> <body> <form id="form1" runat="server"> <div style="position: fixed"> <asp:Button ID="Button1" runat="server" Text="Button" /> </div> <div style="width: 200px; height: 1200px; background-color: Red"> <div> </div> </div> </form> </body> </html>
My Tech blog | My YouTube ChannelPlease 'Mark as Answer' if this post helps you.