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

Post New Web Links

Hiding a jQuery UI Accordion panel

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :ASP.Net
I have several Accordion panel and each one contains a datalist of hyperlinks, that when clicked will append a querystring to the current URL. What I'm trying to do is after the pages reloads or after clicking a hyperlink I want that datalist together wit its corresponding accordion panel gone. I'm using a single file for the markup and code btw.

View Complete Post

More Related Resource Links

Accordion Control with Panel...Add an Update Panel?


I have an accordion control in my web site.  And in one of the panels, I have a drop down list box where, when the user selects an item, it updates the labels right below the ddlistbox.  I have it so that it maintains the scroll position when the ddlistbox has an autopostback, but it's very obvious that the whole page posts back.

My question is, can I/should I just enclose the ddlistbox and the labels (and a couple of text boxes) in an AJAX update panel?  I already have a ToolScriptManager (because of the accordion control), so I don't need to have another script manager, right?  I can just put the update panel (with the other controls inside of it) right in the accordion panel, right?  Then when the ddlistbox posts back it won't have the delay of the whole page posting back?  And it'll still execute the event handler for the listbox selection change?

Does this sound right?  I'm just looking to make the post back "invisible", and I would like to do a partial postback of just these few controls.

Thanks in advance! :)

JQuery accordion menu issue!!!

Hi,I have added this accordion menu in the master page of an asp.net(C#) website. http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-bullet.htm?expandable=4&subexpandable=0It works fine in those content page which are in the root folder but it is continously showing error in Administration page and the error is ddaccordion is not defined [Break on this error] ddaccordion.init({ //top level headers initialization Can anybody let me know why it is giving this error?Any help will be really appreciated !!!Regards,Dazy

jquery is not working in asp.net panel and/or update panel ? need help

I have 3 panels on single .aspx page and depending on condition required panel is displayed . Default panel is panel 1 .  I have created a image gallery which displays thumbnails of various images and when I hover on that image its preview is displayed. I have put the code for this image gallery in 2nd panel, it displays thumbnails but on hover preview is not displayed. but  if I somehow make postback then it works. And I place the same code in !st panel it works ? Can anyone tell me whats wrong with my code? Regards, anas anjaria I have 3 panels on single .aspx page and depending on condition required panel is displayed . Default panel is panel 1 . I have created a image gallery which displays thumbnails of various images and when I hover on that image its preview is displayed.I have put the code for this image gallery in 2nd panel, it displays thumbnails but on hover preview is not displayed. but  if I somehow make postback then it works.<div> /* PAnel 1*/ <asp:UpdatePanel ID="updpnl2" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Panel ID="pnl2" runat="server" Visible="false"> /*other coding stuff*/ <div id="wrap"> <div id="styles-table"> <div id="styles-wrap"&g

ModalPopupExtender and Update Panel - Have to click twice after hiding ModalPopupExtender

I am using a ModalPopupExtender that displays an UpdatePanel that contains a custom control.  Whenever someone clicks on the button to show my ModalPopupExtender, after you close the Modal window, the first time you click on anything in the web page it doesn't work.  You have to click a second time to get any links, buttons, etc to work.  It's almost like the modal popup is disabling the page behind it and the page doesn't have focus until you click on something.  I tried just clicking anywhere in the page and that doesn't work.  You have to click on a control that does something.  I confirmed that no matter how many times I load my page and how I load it, it only occurs right after showing the ModalPopup. Example: I click on the button on my form called 'Open Modal'.  It opens the modal window. I click on the 'Cancel' button inside the modal window and it closes.  I select a link inside the page and it doesn't do anything. I click that same link a second time and it fires the click event. I am using AjaxControlToolkit 1.0.10920 Any help would be greatly appreciated. Thanks!

Using jQuery .hide() and .show() on panel sets doesn't maintain status through postback. Viewstate

I'm using jQuery against a set of three asp panels.  I set up an 'onChange' function for a dropdown list that dictates which panels to hide and show based on the UI selection.When the page first loads, one of the panels will be shown, the others will be hidden.  Let's say pnlOne is showing because the dropdown has option 1 selected.  This is done on the server with this:pnlOne.Style.Add("display","block");//and all the other panels are set to ".Style.Add("display","none");" based on logic.Then, the user selects a different value in the dropdown.  Let's say they select option number 2.  With javascript and jQuery I do this:$("#<%=pnlOne.ClientID %>").hide();$("#<%=pnlTwo.ClientID %>").hide();$("#<%=pnlThree.ClientID %>").hide();switch($("#<%= ddlOptionNumber.ClientID %> option:selected").text()){case "1":$("#<%= pnlOne.ClientID %>").show();break;case "2": etc.,}The issue is when the page posts back.  I'm running client side validation only at this point.  (Even if I add client side in the future I will still run client side as well to avoid security issues.)  When the validation functions detect an issue and the page returns to be displayed, the original panel (pnlOne)

update panel and jquery problem

I m working on JQuery, I have one UserControl in that I have taken one button(it is present inside an updatePanel).  when i m clicking on button on that time i want to show alert from server side for that i have written-  ScriptManager sm = ScriptManager.GetCurrent(Page); string strScript = "alert('hi')"; ScriptManager.RegisterStartupScript(this, typeof(UserControl_FrmUConFriendList), "AlertKey", strScript , true); But it is not working, if i m removing updatePanel then it is working. So plz help me. Thank's in advance.    

User Control with JQuery doesnot work inside update panel


Hi All,

I created a .NET user control to work as a DropdownCheckbox and added Jquery to give the sliding and hide effects. The code is as below:

 <script language="javascript" type="text/javascript">
        var showRegionWindow = function (ev) {
            var pos = $("#lnkChangeRegion").offset();
            var width = 230;
            var height = 55;
            //$("#changeRegionPanel").css({ "left": +((pos.left) - 215) + "px", "top": height + 16 + "px" });.
            document.getElementById("lnkChangeRegion").style.display = 'none';

        var hideRegionWindow = function (ev) {
            var textVal = "";

Color Box Jquery Not Working in Update Panel After the Initial Postback


Hi Guys,

I have an UpdatePane that contains a Listview


		<asp:LinkButton ID="lnkName" runat="server" CommandArgument='<%# Container.DisplayIndex %>'
            CommandName="SelectedRow" Text='<%# Eval("Name") %>' Class="info" Rel='<%# Eval("ID") %>' />

This linkButton will serves as the trigger to call my color box jquery. Function stated below

 <script src="script/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="script/jquery.colorbox-min.js" type="text/javascript"> </script>
    <script type="text/javascript">

        $(document).ready(function() {

            $("a.info").click(function() {

                $(this).attr("href", "EmployeeDirectoryDetail.aspx?id=" + $(this).attr("rel"));
                $(this).colorbox({ height: "200p

how do you send a parameter value to a datasource from within an accordion panel?



i have an accordion panel that is loading its values from a datasource, which is working fine. let's say it loads the 50 states from the states table. now inside each accordion panel, when expanded, i want to load a gridview with details of that specific state. also, i want to pull all the cities into another gridview from the cities table with stateID=@stateID.

i know this should be simple, but how do i pass the value of the stateID to the datasource of cities gridview? what is the syntax?

the abbreviated code i have so far is:

<cc1:Accordion ID="Accordion1" runat="server" DataSourceID="StatesDataSource" >
    <HeaderTemplate >
        <asp:Literal ID="ltrHeader" runat="server" Text='<%# Eval("name") %>'></asp:Literal>
        <asp:GridView ID="citiesGridview" runat="server" DataSourceID="CitiesDataSource4"
            AutoGenerateColumns="False" DataKeyNames="id" AllowSorting="True" OnDataBinding="??" >

create a data driven jquery accordion control



i have a very simple table in my database which holds information about students.

what i would like is to create a jquery accordion which will have a heading for each student and then when the user clicks on a students name, it will expand and display the students information from this table.

is this possible? please can someone show me examples of how i can do this?

i use linq to sql and its an asp.net form (aspx page) not mvc.

i am very new to this aso any help would be much apperiated along with examples.

the only thing i have so far is the following - my accordion is in a jquery dialog box also.

$(function() {

	$('#my div').dialog({

		modal: 'true',

		title: 'students',

		open: function() {





many thanks

Jquery validate message disappearing in update panel



I am having an issue where i have fields on a form that contains an update panel that i want to do Jquery validation on. The issue is when i click  the OK button, the validation error message appears then goes away. Looks like some post back type of issue but was wondering if someone could help. THe code is below:


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!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 id="Head1" runat="server">
<title>Project Management System</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.3.js"></script>
<script type="text/javascript" src="

how to Dynamically fit form(width & height) acording asp.net panel,of html filedset using jquery


Jquery tab panel info


hi all ,

i require the jquery tab panel , on tab index i want to issue web service call through client side. if you have used any component ,please let me know.


CSS jquery panel on top of DIV


I am developing a page where I have a div and inside the div I have a grid. now i want to provide my users a SEARCH facility so therefore I have got a search panel div along with a toggle button which slides down and slide up on toggle. I have placed that SEARCH slide down panel on top of my grid div. Problem is that when I slide down it pushes down the grid div which i dont want. i want my grid div to stay there and slide div panel should appear on top of it with a transparent effect. I am using IE7 or IE8 later.

here is the code css code

#panel {
	background: #F0FEDC;
	height: 200px;
	display: none;
	border: 1px solid #000;
#panel h2, p{
margin:0px; padding:0px; padding-top:20px; padding-left:40px; color:#666
.slide {
	margin-left: 10;
	padding: 0;
	border-top: solid 1px #2b5386;
	background: url(../images/btnslider.png) no-repeat center top;
.btn-slide {
	/*(background: url(white-arrow.gif) no-repeat right -50px;*/
	text-align: center;
	width: 144px;
	height: 31px;
	padding: 3px 10px 0 0;
	margin: 0 auto;
	display: block;
	font: bold 80%/80% Arial, Helvetica, sans-serif;
	color: #fff;
	text-decoration: none;
.active {
	background-position: right 12px;

here is the aspx

<%@ Page Title="" Language="C#" MasterPageFile=&

Ajax Accordion panel parent child child menu creation



Hi, I am trying to set up a Ajax Accordion Dynamic menu from the database. Functionality must be as follows:  I have Parent with a child and child with other child    can any one help me in this .

. Thanks in advance

Custom Update Panel with jQuery



I'm trying to develop a webcontrol that works like an UpdatePanel but with the jQuery framework instead of the 'classic' MS Ajax framework...

In this webcontrol I add a listener to the 'SaveStateComplete' so the Viewstate is 'fixed' and then I can avoid the Render phase and render only the 'panel-html' and the '__viewstate-field'...

This works very well for the first  Ajax callback.

From the second I receive the following error: "The viewstate is invalid for this page and might be corrupted".

The reason, I think, is because I have updated only  the __viewstate field while I should also update the __eventvalidation field....but I don't know where to get it (and I hope that it is not extracted during the Render phase...).

Now the question:

Is there a way to get the new __eventvalidation value in the page's life-cycle??? Or is there a way to recalculate it?? (I have tried to google for something like this but without results...).

I will appreciate any help (and any suggetion, because I 'm a newbie with Asp.Net).


how to set two panel height same using jquery


i create a two asp panel first for take new message  and second for show message

how to set two panel height same using jquery

<asp:Panel id="Pa_TreeNewBlog"  Style="top:60px;left:0px;position:absolute;" ScrollBars="Auto"  runat="server" GroupingText="Select New Blog Context">
content. Xyz....................................

<asp:Panel id="Pa_TreeNewBlog2"  Style="top:60px;left:0px;position:absolute;" ScrollBars="Auto"  runat="server" GroupingText="Select New Blog Context">
content. ABCD....................................

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