15th: Ajax Control Toolkit control package-4. alwaysvisiblecontrolextender

Source: Internet
Author: User
 Div>
<Asp: updatepanel id = "updatepanel1" runat = "server">
<Contenttemplate>
<Asp: Panel id = "Panel1" runat = "server" width = "161" Height = "127"
Bordercolor = "# c2c2c2" borderstyle = "Dashed" borderwidth = "1px">
<Br/>
<Br/>
Learning Ajax <br/>
Go to playaspx.com </ASP: Panel>
<PC3: alwaysvisiblecontrolextender id = "alwaysvisiblecontrolextender1"
Runat = "server" targetcontrolid = "Panel1" verticalside = "Middle">
</PC3: alwaysvisiblecontrolextender>

<Asp: dropdownlist id = "dropdownlist1" runat = "server" autopostback = "true"
Onselectedindexchanged = "dropdownlist1_selectedindexchanged">
<Asp: listitem value = "NONE"> default </ASP: listitem>
<Asp: listitem value = "00"> top left </ASP: listitem>
<Asp: listitem value = "01"> middle left </ASP: listitem>
<Asp: listitem value = "02"> bottom left </ASP: listitem>
<Asp: listitem value = "10"> upper </ASP: listitem>
<Asp: listitem value = "11"> medium </ASP: listitem>
<Asp: listitem value = "12"> lower </ASP: listitem>
<Asp: listitem value = "20"> top right </ASP: listitem>
<Asp: listitem value = "21"> middle right </ASP: listitem>
<Asp: listitem value = "22"> bottom right </ASP: listitem>
</ASP: dropdownlist>
</Contenttemplate>
</ASP: updatepanel>

 

  protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
switch (DropDownList1.SelectedValue[0].ToString())
{
case "0":
AlwaysVisibleControlExtender1.HorizontalSide = HorizontalSide.Left;
break;
case "1":
AlwaysVisibleControlExtender1.HorizontalSide = HorizontalSide.Center;
break;
case "2":
AlwaysVisibleControlExtender1.HorizontalSide = HorizontalSide.Right;
break;
default:
AlwaysVisibleControlExtender1.HorizontalSide = HorizontalSide.Center;
break;
}
switch (DropDownList1.SelectedValue[1].ToString())
{
case "0":
AlwaysVisibleControlExtender1.VerticalSide = VerticalSide.Top;
break;
case "1":
AlwaysVisibleControlExtender1.VerticalSide = VerticalSide.Middle;
break;
case "2":
AlwaysVisibleControlExtender1.VerticalSide = VerticalSide.Bottom;
break;
default:
AlwaysVisibleControlExtender1.VerticalSide = VerticalSide.Middle;
break;
}
}

Common attributes:

1. targetcontrolid: ID of the control that needs to be in the 'Pending' state.

2. horizontalside: horizontal position of the controlled control, which can be left, center, or right. The default value is left.

3. horizontaloffset: used in combination with the preceding horizontalside. If horizontalside is left, set horizontaloffset to 10px, indicating that it is 10 PX away from the left side of the browser.

4. verticalside: the vertical position of the controlled control, which can be top, middle, or bottom. The default value is top.

5. vertivcaloffset: It is used with verticalside to control the number of pixels between the control and verticalside. If verticalside is set to top and verticaloffset is set to 20 PX, the distance between the control and top is 20 PX.

6. scrolleffectduration.

CS code, introduce the namespace using ajaxcontroltoolkit;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.