Now I am going to describe how to use Modal Popup Extender in ASP.NET website
Follow the below mentioned steps
Step 1. Add Ajax Control Toolkit reference in your website. For this See This Post
Step 2. If the ScriptManager tag is not present is your form then it should be specified inside the Form tag.<asp:ScriptManager Id="sm1" runat="server" />
Step 3. now insert Always Visible Control like
// Paste this code below the page directive and above all othe tags
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
// drap Always Visible Control in you page and set targetcontrolid, etc.. for example
<cc1:AlwaysVisibleControlExtender ID="Button1_AlwaysVisibleControlExtender"
runat="server" Enabled="True" TargetControlID="Button1" VerticalSide="Top" HorizontalSide="Right">
</cc1:AlwaysVisibleControlExtender>
where TargetControlId : ID of control for this extender to always make visible
and VerticleSlide and HorizontalSlide are the properties to set the position of the control
Follow the below mentioned steps
Step 1. Add Ajax Control Toolkit reference in your website. For this See This Post
Step 2. If the ScriptManager tag is not present is your form then it should be specified inside the Form tag.<asp:ScriptManager Id="sm1" runat="server" />
Step 3. now insert Always Visible Control like
// Paste this code below the page directive and above all othe tags
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
// drap Always Visible Control in you page and set targetcontrolid, etc.. for example
<cc1:AlwaysVisibleControlExtender ID="Button1_AlwaysVisibleControlExtender"
runat="server" Enabled="True" TargetControlID="Button1" VerticalSide="Top" HorizontalSide="Right">
</cc1:AlwaysVisibleControlExtender>
where TargetControlId : ID of control for this extender to always make visible
and VerticleSlide and HorizontalSlide are the properties to set the position of the control
Properties of Modal Popup Extender and their meaning
- 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.
- UseAnimation - Whether or not to animate the element into position. The default is false.