Here I will explain how to use the Ajax Collapsible Panel in asp.net.
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %> <!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>Collapsible Panel Example</title> <style type="text/css"> .pnlCSS{ font-weight: bold; cursor: pointer; border: solid 1px #c0c0c0; width:30%; } </style> </head> <body> <form id="form1" runat="server"> <ajax:ToolkitScriptManager ID="ScriptManager1" runat="server"> </ajax:ToolkitScriptManager> <div> <asp:Panel ID="pnlClick" runat="server" CssClass="pnlCSS"> <div style="background-image:url('green_bg.gif'); height:30px; vertical-align:middle"> <div style="float:left; color:White;padding:5px 5px 0 0"> Collapsible Panel </div> <div style="float:right; color:White; padding:5px 5px 0 0"> <asp:Label ID="lblMessage" runat="server" Text="Label"/> <asp:Image ID="imgArrows" runat="server" /> </div> <div style="clear:both"></div> </div> </asp:Panel> <asp:Panel ID="pnlCollapsable" runat="server" Height="0" CssClass="pnlCSS"> <table align="center" width="100%"> <tr> <td></td> <td> <b>Registration Form</b> </td> </tr> <tr> <td align="right" > UserName: </td> <td> <asp:TextBox ID="txtuser" runat="server"/> </td> </tr> <tr> <td align="right" > Password: </td> <td> <asp:TextBox ID="txtpwd" runat="server"/> </td> </tr> <tr> <td align="right"> FirstName: </td> <td> <asp:TextBox ID="txtfname" runat="server"/> </td> </tr> <tr> <td align="right"> LastName: </td> <td> <asp:TextBox ID="txtlname" runat="server"/> </td> </tr> <tr> <td align="right"> Email: </td> <td> <asp:TextBox ID="txtEmail" runat="server"/> </td> </tr> <tr> <td align="right" > Phone No: </td> <td> <asp:TextBox ID="txtphone" runat="server"/> </td> </tr> <tr> <td align="right" > Location: </td> <td align="left"> <asp:TextBox ID="txtlocation" runat="server"/> </td> </tr> <tr> <td></td> <td align="left" > <asp:Button ID="btnsubmit" runat="server" Text="Save"/> <input type="reset" value="Reset" /> </td> </tr> </table> </asp:Panel> <ajax:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server" CollapseControlID="pnlClick" Collapsed="true" ExpandControlID="pnlClick" TextLabelID="lblMessage" CollapsedText="Show" ExpandedText="Hide" ImageControlID="imgArrows" CollapsedImage="downarrow.jpg" ExpandedImage="uparrow.jpg" ExpandDirection="Vertical" TargetControlID="pnlCollapsable" ScrollContents="false"> </ajax:CollapsiblePanelExtender> </div> </form> </body> </html> | |
![]() |
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|


Subscribe by RSS
Subscribe by Email
10 comments :
very helpful post
really thanks.
suresh you are awesome yar ,and you to continue to socialwork
Sir, I am not able to run this as your demo is showing. I have pasted and referred AjaxControlToolkit.dll file. Also I am not able to use the rest ajax tools!
How to use Collapsible panel in Grid view in C# asp .net
My Email ID:-Jakharji@rediffmail.com
Hi Can I have this with grid view sample please.. Like I will show EmpID and Name in initial gridview when i select EmpID i would like to show another gridview
Sir Keep Continue Posting..
Great Job You Are Doing..
May God Bless You...!!!
Hello. On the right side of this page is a sliding panel object with the FACEBOOK logo. Is that done with the ASP.Net Ajax Collapsible Panel Control? If not, how is that done? Thanks.
Sir i want code facebook logo placed in your website
Excellent. directly if would have been posted the aspx means many of us would have been missed to see your things. i mean the moving picture what you have displayed below know, it will tells the whole story with in a second and sets and sits us to try out the stuffs as how exactly you have done. Thanks a lot. I like you way of presentation. Excellent, this how it has to be where a person wants to lean the new stuffs. Very nice. Thanks a lot
that logo is done with ajax always visible control etender i guess...