.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Creating collapsible panel dynamically in datalist

Posted By:      Posted Date: September 11, 2010    Points: 0   Category :ASP.Net
Hey guys,Here is what I have done so far. I have a datalist to show notifications. The datalist is bound to an sqldatasource. I have tried to use a collapsible panel extender in the datalist to hide or show message, but the designer could not render the datalist because of the collapsible panel control. It gives an error "Unknown server tag asp:CollapsiblePanelExtender"here is my code<asp:DataList ID="DataList4" runat="server" Width="625px" DataSourceID="SqlDataSource1" OnItemDataBound="FormatInput"> <HeaderTemplate> <asp:Label ID="Label3" runat="server" Font-Names="Castellar" Font-Size="Large" Text="Notifications"></asp:Label> </HeaderTemplate> <ItemTemplate> <table style="width: 605px"> <tr> <td style="width: 453px"> <asp:Label ID="lbl_Username" runat="server" Text='<%# Eval("UserName") %>'></asp:Label>  <asp:Label ID="lbl_NoteType" runat="server" Text='Label'></asp:Label> : <asp:LinkButton ID="lbtn_V

View Complete Post

More Related Resource Links

Dynamically creating Gridview Template - Linkbutton Click not working



I have written some code to dynamically generate template columns for gridview which works well. However, each cell in the gridview has to be a linkbutton, which when clicked does a db update and redirects to a specific url with some parameters in it.

I have attached a click event handler to the linkbutton in the InstantiateIn method but the event does not seem to fire.

Could someone please help? the code is below -

//Dynamically creating the Grid

protected void btnAnalyze_Click(object sender, EventArgs e)

How to collapse the expanders dynamically in a stack panel?

Hello, please help me in this scenario: I have created 1 stack panel & dynamically i have added the expanders. How to collapse the expanders when 1 expander is expanded??? i want 1 expander to be expanded at a time, when i expand 1 expander, automatically other all expanders should be in collapsed state??

collapsible panel

Hiiii Coders, I have four collapsile panels. Now i want there sould be two link buttons expand all and collapse all. Now whenever user will click on expand all, all the collapsible panels should expand at the same time. Similarly, whenever user will click on collapse all, all the panels should be collapsed. How can i do so? plz provide some code snippets as soon as poss thanx and regards 

Creating asp.net page dynamically

Hi All:  I have a requirement that I need to create asp.net page dynamically for each folder inside a specific folder. I know the code to traverse each folder but I don't know how to create a new page dynamically and show the contents. Please help me on this.   Regards,  Asif HameedHi All: I have a requirement that I need to create asp.net page dynamically for each folder inside a specific folder. I know the code to traverse each folder but I don't know how to create a new page dynamically and show the contents. Please help me on this.  Regards, Asif Hameed

Collapsible Panel Extender Issue

Hi Everyone,I am facing strange problem when using the Collapsible Panel Extender inside a gridview. It saying control with the same id cannot be added to the application. Please suggest me solution in this regard asap.Thanks in advance...

Collapsible Panel Expand Event Help

I have a series of collapsible panels on a page. Each of them contain a databound listview. I am looking for a way to prevent the massive hit to the DB on page load. I was thinking about holding the databinding until the user expands the panel. But there is no onExpanding event. Any ideas on how I can fire server side code when the panel is expanded?

How to prevent collapsible panel from closing modal window

I have a collapsible panel extender inside a modal window, my problem is that whenever I click on the link button (to expand my panel), the window closes. Does anyone know of a way to avoid this?

Collapsible Panel and overflow-y: hidden

Hi Guys,We added collapsible panel to our site quite sometime back but it seems that they are no longer working in FF. It seems to be after the upgrade of the collapsible panel dll. Here's the asp.net code: <asp:Panel ID="pnlIssuesAssignedEvaluationHeader" runat="server" SkinID="collapsiblePanelHeader"> <h2> <span class="collapsibleHeaderText">Assigned to you for Evaluation <asp:Label ID="lblIssuesAssignedEvaluation" runat="server"></asp:Label> </span><span class="collapsibleHeaderImage"> <asp:Image ID="imgIssuesAssignEvaluation" runat="server" /> </span> </h2> </asp:Panel> <asp:Panel ID="pnlIssuesAssignedEvaluation" runat="server" SkinID="collapsiblePanel"> <asp:GridView ID="gvEvaluation" runat="server" DataSourceID="dsEvaluationIssues" AutoGenerateColumns="False" EmptyDataText="All Done!" SkinID="Sortable" OnSorting=&quo

How to dynamically add table rows within update panel ?

Hi, In my webform, i have 3-4 textbox, on there textchange event i have to fetch data from database and put it on the form. I have taken another html table (with runat="server")  below textbox and  and in textchange event created a new <tr>, <td> and simply added contents in <td>, then finally added <tr> in the table. This is done in UpdatePanel. When i enter something in textbox1 data is added in that table,that's fine. But when i enter something in 2nd textbox the previous data is overridden. My requirement is that if 2nd textbox's text changes than another row with appropiate data should be added, i.e., now two rows. Silimarly if 3rd ,4th textbox data changes then subsequently 3 or 4 rows should be displayed. What should i do ?

Dynamically building linkbuttons to update a panel ~ PostBackURL's


I have a pretty simple C # page that when the page first loads, a bio is diplayed in that center section based upon sql executed from my code behind.  I have 4 link buttons on the page that when clicked, fill that center section with other content based upon which link button they clicked (News, Publications, Contact Info, and Presentations).     I was all done, then I thought about using an UpdatePanel to get rid of the annoying "flicker" when the page posts back on the click of the link button. 

So, I added an update panel, and  the necessary triggers on the 4 link buttons, since they are outside of the UpdatePanel.   But, I'm stumped on what to do with the link buttons in the codebehind.  In my current code behind, I set the PostBackURL's programatically (see below), but if I want to use an update panel, should I still be building the Postback URL's?? 

lbPublications.PostBackUrl = "~/Person.aspx?PersonID=" + Request.QueryString[

When dynamically creating an excel file, can SSIS create xlsx files successfully? I can only get SSI


Problem: An Excel file (XLSX) dynamically created by a SQL Task cannot be opened via Excel. The task succeeds, but when you try to open the workbook in Excel you get the fillowing error message: Excel cannot open the file 'myfile.xlsx" because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.

1. If the Excel file (xlsx) is created manually in Excel, then the SQL Task has no problem creating table (new worksheets) in the xlsx (so the "CREATE TABLE" statement works fine)
2. If I adjust the connection and task to work with Excel 97-2003 (xls) format then the approach works perfectly
3. The execution results show success of the SQL Task, but there are two warning messages. These same warnings appear when the SQL Task creates a new table (worksheet) successfully in a workbook (xlsx) which was created manually in Excel (and is not corrupt). Messages as follows:
Warning: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Warning: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

SSIS Details:
1. ConnectionString: "Data Sour

How to track Collapse/ Expand event of AJAX Collapsible Panel Extender to call javascript ?



I am working with AJAX Panel Collapsable panel extender.

The Panel which is to be collapsed/Expanded using AJAX panel Extender contains one custom control, containing 3 Radio buttons one of them is set checked through a javascript function when page loads. I have kept the default property of AJAX collapsable panel as Collapsable.

Script for AJAX Collapsible Panel Extender is as follow. 

 <ajax:CollapsiblePanelExtender ID="cpeSOP" runat="Server" CollapseControlID="pnlCollapsable"
   CollapsedSize="0" Collapsed="True" CollapsedImage="~/public/img/arrowRightWhite.gif"
   ExpandControlID="pnlCollapsable" ExpandDirection="Vertical" ExpandedImage="~/public/img/arrowDownWhite.gif"
   ImageControlID="Image1" SuppressPostBack="true" TargetControlID="pnlSearchCriteria">

But problem is that when page loads, collapsible panel gets collapsed but it resets the radio buttons in custom control. i.e. First radio button does not get checked. Script for Collpsable panel is as follow. I want to call some javascript code when the panel is Collapsed or Expanded. Is there any way to track Coll

Error : While using Collapsible panel in gridview


Dear All,

i am using a grid view as a child control inside a grid view and using an collapsible panel extender to show and hide the child grid.

here is my code

<asp:Panel ID="Panel1" runat="server">
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                                    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; background-color: ButtonFace;
                                        font-family: Arial; font-size: 13px;">
                                            <td align="left" width="7%">
                                                <b>Select Date :</b>
                                            <td align="left" width="15%">
                                                <asp:TextBox ID="txtdate" runat="server"></asp:TextBox>
                                                <img src="Calendar_scheduleHS.png" alt="Select Date" id="calimg&quo

Datalist paging Dynamically........


Hi all. Actually am given a  urgent task of implementing paging using Asp.net Datalist

I did that by using "PagedDataSource" Class..by placing two buttons         

"prev Page" &"Next Page" ..it reallty worked..But am asked to do that by placing  links

1 ,2 ,3(pages)dynamically ...In this case database is not used ...the data api is already


All i wanted to do is that to implement paging by using 1, 2 ,3 links and it should adjust accordingly to the number of records in the datalist....

Thanks in Advance..


Am a beginner ...kindly help me....

Problem with creating more than one Panel


I have this code:

in Default.aspx:

    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />

    <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" /><br /><br />



    <asp:PlaceHolder ID="PlaceHolder1" runat="server">




and in Default.aspx.cs:

    protected void Button1_Click(object sender, EventArgs e)
        Panel pan = new Panel();

some invisible parts within collapsible panel extender


It sometimes sucks when logicaly one can not find an understandable reason for Asp problems or finding them out always needs a

knowledge which is not available on documentations.

Well problem here is that I use Collapsible panel extender to show a repeater inside a fixed positioned div.

what I get as a result is just header and Item template of repeater. no footer template.

even puting content of footer panel outside repeater but inside collapsible panel doesn't solve the problem.

my code is as following :

<div id="rbkorgenpnl"   style ="position : fixed ; top : 0px; left : 490px; z-index : 100px; ">

<asp:Panel ID="rbkorgExtPnl" runat ="server" Width ="400px" >
<div id="Div7" class="rbkorgddpaneltab">
<a href="#"><span>

Rabatkorgen  <img src="images/css/print0.jpeg" width ="20px" height ="20px" /> <img src="images/css/sms.jpeg" width ="20px" height ="20px"/></span></a>
<asp:Panel ID="rbkorgColPnl" runat ="server" Width ="400px" style="background-image :url(images/frame/bg_rabattkorgen.png); background-repeat :no-repe

ASP.NET AJAX : Collapsible Panel PostBack


Hi experts,

I have used CollapsiblePanel on my page, but when page is Post back, then it is redrawing all controls inside to it.


How to resolve it?

Please reply guys.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend