Home > DeveloperSection > Articles > Ajax ToolKit AlwaysVisibleControlExtender in ASP.Net

Ajax ToolKit AlwaysVisibleControlExtender in ASP.Net


AJAX AJAX 
Ratings:
0 Comment(s)
 12425  View(s)
Rate this:

Ajax ToolKit AlwaysVisibleControlExtender in ASP.Net

AlwaysVisibleControlExtender is used to define area of content on user interface to remain visible when user scrolls around the rest of the content of the page.

Syntax:

<cc1:AlwaysVisibleControlExtender ID="AlwaysVisibleControlExtender1" runat="server">

</cc1:AlwaysVisibleControlExtender>

AlwaysVisibleControl Properties:

·         TargetControlID - ID of control for this extender to always make visible

·         HorizontalOffset - Distance to the HorizontalSide edge of the browser in pixels from the same side of the target control. The default is 0 pixels.

·         HorizontalSide - Horizontal edge of the browser (either Left, Center, or Right) used to anchor the target control. The default is Left.

·         VerticalOffset - Distance to the VerticalSide edge of the browser in pixels from the same side of the target control. The default is 0 pixels.

·         VerticalSide - Vertical edge of the browser (either Top, Middle, or Bottom) used to anchor the target control. The default is Top.

·         ScrollEffectDuration - Length in seconds of the scrolling effect to last when the target control is repositioned. The default is .1 second.

Code:

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

<cc1:AlwaysVisibleControlExtender ID="AlwaysVisibleControlExtender1" runat="server" TargetControlID="Panel1" HorizontalSide="Right">

</cc1:AlwaysVisibleControlExtender>

<%-- Here HorizontalSide="Right" so Panel1 which is TargetControlID will be  set in right hand side --%>

   

<asp:Panel ID="Panel1" runat="server" BackColor="#0099CC">

<br />

<%--Here we take login control inside panel which is alwaysvisible panel--%>

<asp:Login ID="Login1" runat="server"></asp:Login>

<br/><br />

</asp:Panel>

<asp:Panel ID="Panel2" runat="server">

<asp:Label ID="Label1" runat="server" Text="Image List " Font-Size="XX-Large"></asp:Label>

<br /><br />

<%--Here we take 3 image simply for  showing Image--%>

<asp:Image ID="Image1" runat="server" Height="230px" ImageUrl="~/Jellyfish.jpg" />

<br /><br />

<asp:Image ID="Image2" runat="server" Height="230px" ImageUrl="~/Lighthouse.jpg" />

<br /><br />

<asp:Image ID="Image3" runat="server" Height="230px" ImageUrl="~/Desert.jpg" />

</asp:Panel>

 

TargetControlID is "Panel1” this panel will always visible when you will scroll down the page.

Run the project

Subscription panel will always visible when you will scroll down the page.

AjaxControl ToolKit AlwaysVisibleControlExtender in ASP.Net

 

Here page is scroll down but login panel is still visible because this panel is handled by AlwaysVisibleControlExtender.

AjaxControl ToolKit AlwaysVisibleControlExtender in ASP.Net


Don't want to miss updates? Please click the below button!

Follow MindStick