.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

create a data driven jquery accordion control

Posted By:      Posted Date: October 18, 2010    Points: 0   Category :ASP.Net


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

View Complete Post

More Related Resource Links

How to create custom control in .net which can retrive data from sharepoint list and redirect to sit


Hi help me!

I am strugling this problem!

My requirement is I need to create a custom control which need to retrive data from sharepoint list, The list contain some sites information like Title, url, Scope my requirement is i need to display sites Title in my custom control and when i click on title (site name) in custom control it need to be redirect to that site and whenever list data updated automaticaly custom control data also need to be apdated automatically .

how to create list order and unorder list using data table(asp.net,or jquery)


1 My DataTable Return following Data

Acct    Books    Annual
Acct    Books    Monthly
Acct    Tax    Income Tax
Admin    GH    Eqpt
Admin    Offc    Eqpt
Admin    Offc    Misc
Admin    Offc    Eqpt
BPO    DE    DE.US
Corp    Comp    Insurance
Corp    Legal    Court
Corp    Legal    Court

but i require in this format

  Income Tax
<ul>   GH 
<li>   Eqpt

<ul> Offc 

Populating JQuery control with data in .NET


Does anybody have an example of  how to populate a JQuery UI control in .NET?  All the examples I have seen are not using .NET.  I am playing around with the Autocomplete example below, but now I want to actually use LINQ or a sproc to populate it from my own database :

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">

<asp:Content ID="Content2" ContentPlaceHolderID="HeadlineContent" runat="server">

    <div id="headline-none">



<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">

    <div id="bigborder">
        <br />

<div class="ui-widget">
	<label for="tags">Tags: </label>
	<input id="tags" />



<asp:Content ID="Content4" ContentPlaceHolderID="ScriptContent" runat="server">
    <script type="text/javascri

GridView control to show master-child or master-slave data, written in c#, asp.net

I previously made a master slave datagrid using Visual Studio 2003 .Net (original article) that would allow users to show data to clients using collapse and expand features. These features however did not carry over to gridview for many users. This tutorial will explaing how to create a collapsable/expandable gridview in frameworks 2.0 and higher

Easily manipulate data with the GridView control in ASP.NET 2.0

Last week, I introduced ASP.NET 2.0's GridView data control and covered the basics of using it. This week, I go a step further by going into the details of working with the data contained in the control. This includes viewing, editing, and deleting data. Thankfully, the GridView control makes it easy to utilize these features. Before diving into these topics, I begin with an examination of the different field types supported by the GridView control.

Sorting Data in a GridView Web Server Control

The GridView control provides built-in sorting functionality without requiring any coding. You can further customize the sort functionality of the GridView control by using custom SortExpression property values for columns as well as by using the Sorting and Sorted events

how to get an array of all the asp.net textbox control inside create user wizard control?



How can I get all the textboxes inside a create user wizard control using getElementsByTagName().

Below is my JQuery code:

<script type="text/javascript">
        function addLoadEvent(func) {
            var oldonload = window.onload;
            if (typeof window.onload != 'function') {
                window.onload = func;
            } else {
                window.onload = function() {

        function prepareInputsForHints() {
            var inputs = document.getElementsByTagName("asp:TextBox");
            for (var i = 0; i < inputs.length; i++) {
                inputs[i].onfocus = function() {
                    this.parentNode.getElementsByTagName("span")[0].style.display = "inline";
                inputs[i].onblur = function() {
                    this.parentNode.getElementsByTagName("span")[0].style.display = "none";



<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

find a Control inside a GridView using jQuery


I have databound GridView in my page and I have a hidden DIV in all rows. Each row contains a Button that I want it to make the DIV visible for me! how can I use that with jQuery?!

here is the code page: 

<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                                EnableModelValidation="True" GridLines="None" ShowHeader="False" Width="100%">

Create ID (uniqueid?) from two fields when data is entered


I need to create an ID from two fields when they are entered into the db for the first time.  I thought Uniqueidentifer would do this, but it looks like uniqueidentifier is random and i have no control of the process. 

My user will enter 4 letters into a column called INIT and 4 numbers into a column called NUMB.  What I would like to do is create an id by combining those fields.

How can I do this?



Persist data in a dynamically populated ListBox in a user control


Hi All,

I am trying to persist data in a dynamically populated ListBox in a user control. Here are the details

I have a user control which contains a a listBox and button. On Page_Load of user control I am populating the ListBox control with some values. On Click of button, I am trying to fetch the values which I have selected in ListBox. Though this seems very simple and straight forward I am unable to fetch values.

My Page_Load Function

void Page_Load(object sender, EventArgs e)










My Click Function

Protected Void Button1_Click(object sender, EventArgs e)


       string strValue = listBox.SelectedValue



I have placed brake point at Page_Load and on click function, I am seeing that the moment the breakpoin

Posting data to ASMX and return Object for jQuery


I am using fluent NHibernate with WebForms and I am trying to build a page where I allow a user to post a status update on their profile page and I a using a .asmx WebService to post the data to the database and then returnig a StatusUpdate instance to the page to be used by jQuery. I have a couple problems.

1) First off when I return a string from the WebService(i was testing) the textbox where the user enters their status doesnt empty the contents. And since the page doesnt refresh even if I manally clear out the textbox and put in something else, it still posts the previous status to the database again. How do I fix this?

2) Secondly, when I return the StatusUpdate Object from the Webservice I cant the results to display anything. Like I sad, Im using jQuery to make an AJX call to the WebService.

Here is my code:

User Profile Page:

Status: <asp:Label ID="status" runat="server"></asp:Label><span style="font-size:.7em;"><asp:Label ID="statustime" runat="server"></asp:Label></span><br />
<textarea id="statusBox" rows="3" cols="40"></textarea><br />
<input type="button" value="Update Status" onclick="SetStatus(); return false;

Velocity: Build Better Data-Driven Apps With Distributed Caching


Microsoft Velocity exposes a unified, distributed memory cache for client application consumption. We show you how to add Velocity to your data-driven apps.

Aaron Dunnington

MSDN Magazine June 2009

.NET RIA Services: Building A Data-Driven Expense App with Silverlight 3


.NET RIA Services provides a set of server components and ASP.NET extensions such as authentication, roles, and profile management. We'll show you how they work.

Jonathan Carter

MSDN Magazine May 2009

Dynamic WPF: Create Flexible UIs With Flow Documents And Data Binding


Flow documents offer enormous flexibility in arranging text layout and pagination, but they don't support data binding, so you can't dynamically change content. Here we build a component to solve that problem.

Vincent Van Den Berghe

MSDN Magazine April 2009

ASP.NET AJAX 4.0: New AJAX Support For Data-Driven Web Apps


Here is an ASP.NET AJAX data-driven Web application that takes the best features from server- and client-side programming to deliver an efficient, user-friendly experience.

Bertrand Le Roy

MSDN Magazine October 2008

Data Services: Create Data-Centric Web Applications With Silverlight 2


ADO.NET Data Services provide Web-accessible endpoints that allow you to filter, sort, shape, and page data without having to build that functionality yourself.

Shawn Wildermuth

MSDN Magazine September 2008

Data Points: Service-Driven Apps With Silverlight 2 And WCF


Here John Papa demonstrates how to build a Silverlight 2 user interface that communicates through WCF to interact with business entities and a database.

John Papa

MSDN Magazine September 2008

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