Microsoft's Ajax Control 2: collapsiblepanel

Source: Internet
Author: User
This control is relatively simple. It has been available since Microsoft released the Ajax predecessor Atlas, and its functional applications are also quite common. This example has already been implemented, now I am not busy with my work and send it to new users for reference and learning. Code :


<% @ Page Language = " C # " Autoeventwireup = " True " Codebehind = " Collapsiblepaneldeml. aspx. CS " Inherits = " Apptestajax. collapsiblepaneldeml "   %>

<% @ Register assembly = " Ajaxcontroltoolkit " Namespace = " Ajaxcontroltoolkit " Tagprefix = " PC3 "   %>

<! 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 runat = " Server " >
< Title > Untitled page </ Title >
</ Head >
< Body style = " Text-align: Center " >
< Form ID = " Form1 " Runat = " Server " >
< Div Style = " Text-align: left " >
Panel Display and hiding Functions < BR />
< ASP: scriptmanager ID = " Scriptmanager1 " Runat = " Server " >
</ ASP: scriptmanager >
< C0: collapsiblepanelextender ID = " Collapsiblepanelextender1 "
Collapsecontrolid = " Image1 "
Expandcontrolid = " Image1 "
Collapsed = " True "
Textlabelid = " Label1 "
Imagecontrolid = " Image1 "  
Expandedimage = " Image/collapse.jpg "
Collapsedimage = " Image/expand.jpg "
Suppresspostback = " True "  
Targetcontrolid = " Panel2 "
Expandedtext = " (Hide details) "
Collapsedtext = " (Show Details) "
Runat = " Server " >
</ C0: collapsiblepanelextender >
< ASP: Panel ID = " Panel1 " Runat = " Server " Height = " 1px " Width = " 561px " Backcolor = " Control " >
< Table Style = " Height: 30px " >
< Tr >
< TD Style = " Width: 100px; Height: 26px; " >
</ TD >
< TD Style = " Width: 331px; Height: 26px; " >
< ASP: Label ID = " Label1 " Runat = " Server " > (Show Details) </ ASP: Label > </ TD >
< TD Style = " Width: 100px; Height: 26px; " >
< A href = " # " > < ASP: Image ID = " Image1 " Runat = " Server " Imageurl = " ~ /Image/collapse.jpg " Alternatetext = " (Show Details) " /> </ A > </ TD >
</ Tr >
</ Table >

</ ASP: Panel >
& Nbsp;
< BR />
< ASP: Panel ID = " Panel2 " Runat = " Server " Height = " 310px " Width = " 571px " >
< ASP: Image ID = " Image2 " Runat = " Server " Height = " 301px " Imageurl = " ~ /Image/img_1629.jpg "
Width = " 548px "   /> </ ASP: Panel >
< BR />
< ASP: Image ID = " Image3 " Runat = " Server " Height = " 393px " Imageurl = " ~ /Image/img_1629.jpg "
Width = " 566px "   />

</ Div >
< BR />
</ Form >
</ Body >
</ Html >

It's relatively simple, so I don't need to explain anything. Haha, let's discuss it if you have any questions ....... together, I made some contributions to China's software ......

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.