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

Post New Web Links

Display N-Heirarchical Menus Using Dynamic Repeater Control

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :ASP.Net

I want to Display N-Heirarchical Menu using Dynamic Repeater Control along with CheckBoxes.

If Suppose i am having 3 level Menus i need to create 3 Repeaters Dynamically along with CheckBoxes beside of that sub Menus

View Complete Post

More Related Resource Links

ModalpopupExtender to display dynamic content from database and content from form's control


Dear All,


I have a grid, in that i have edit button column, If user wants to click on the edit button I need to open a modal window to display the records for the particular row data from database.


And also I am using SMS form to send sms, If user click on the send button I need to open the modal window and to dislpay a preview of the sms from the textbox of the same form.


Please help me to achieve these two functionality.


Thanks in advance.




Arun Kumar

How to display data in asp.net Repeater control?

In this article, we will see how to display the data using repeater control which is basic and light weight control in asp.net

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

ASP.NET repeater control - databind with style

even used the inline editing features, which I at the time thought was the coolest way possible to write ASP.NET code ( I managed to write code to hide all other rows and only show the current one - the row being edited). With a nice looking EditTemplate it looked indeed very slick but it really turned into giant and hard to manage code behind files.

Creating Paging for a Repeater Control

A common question is "How do I implement paging within a Repeater?" Although the beauty of the Repeater control is its flexibility, you're on your own for building most functions. ASP.NET 2.0 has included some new controls that provide paging, as does the DataGrid in ASP.NET 1.1. However, this tip shows you how to roll your own paging for a simple data viewer.

Adding new items to a Repeater control with transitions?



I am currently in the process of writing a facebook type 'activity feed' for a site. Currently I am binding the last 10 items to a repeater control, which contains a usercontrol representing each item. This works fine but there are a couple of requiremnts that are giving me problems and wondered if the the good people of the forum could make some suggestions.

The requirement is that when a user clicks a refresh button any new events are added to the top of the list, the previous items drop down and the equivalent number of old items drop off the bottom, all with nice slider transitions.

I have put the repeater inside of an update control and are able to handle the transitions by using RegisterStartup script to drop jquery calls onto the page for the slider. However I cannot find a way to dynamically add or remove new datarows to the repeater. I need the old items to stay in the repeater and be pushed down by the new items, so completely refreshing the datasource seems like a bad idea.

I was thinking about maybe storing the datasource in the viewstate and adding rows to that, maybe with an extra column on the end which stores what transition is needed on the databind for my jquery, but there will be a 'View more items' link at the bottom of the page, so I am worried that the list could get pretty large and there

"Type ASP.x is not defined" error for dynamic user control when publishing updateable


I have a user control (ContainerCtrl) which programmatically instantiates another user control (SimpleCtrl) in OnLoad. It builds and runs fine, but when I publish it I get the error "error BC30002: Type 'ASP.SimpleCtrl' is not defined." (If I publish without the "updateable" option there's no error, but I need the site to be updateable.)

I assume this has to do with the particulars of how the assembly(ies) are built for the different compiler options. My question is, how can I get it to work properly for "updateable" publishing?

VS 2008 / .NET 3.5 sp1

The code follows (web.config is the default from Visual Studio).

Many thanks, Dave


<%@ Control Language="VB" ClassName="SimpleCtrl" CodeFile="SimpleCtrl.ascx.vb" Inherits="_SimpleCtrl" %>

    Simple control


Partial Class _SimpleCtrl
    Inherits UserControl

    'Nothing to see here.

End Class


<%@ Control Language="VB" CodeFile="ContainerCtrl.ascx.vb" Inherits="_ContainerCtrl"

Dynamic menu control


Dear all,

I want to get the names of some folders in my drive and populate my menu control with the names of those folders.

Getting the folder names is not the issue, but how can i populate my menu with the names of getted foldernames.

I tried this:

DirectoryInfo dirInfo = new DirectoryInfo(Server.MapPath("~\\MyFolders\\"));
DirectoryInfo[] dirs = dirInfo.GetDirectories();
Menu1.DataSource = dirs;

But im getting the error:

HierarchicalDataBoundControl only accepts data sources that implement IHierarchicalDataSource or IHierarchicalEnumerable.


How can i achieve this?

Thanks in advance.


Passing Primary Key to User Control to Display Record Detail


I'm building a user control to display detail information on a parent record. The user control will be displayed via an Ajax Modal Popup. The user control works and is displayed when expected. The problem that I'm having is that I'm not able to pass in the primary key for the parent. The control is displayed via the _ItemCommand event of a Repeater. In the markup for the user control, I explicity set the ContactId to 0 to avoid an error when the control loads (its still underdevelopment, eventually that I'll check if the value is valid).

I was assuming that I could change the property in the _ItemCommand event, but obviously its not working.

In the Page_Load event this code successfully sets the ContactId property of the control. The _ItemCommand event appears to set the value. However when I set a test label on the user control to the Me.ContactId, its showing '0' as if it was never passed in.

        UserControlContactDetail.ContactId = "1462"
        test.Text = UserControlContactDetail.ContactId

    Protected Sub RepeaterDirectory_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles RepeaterDirectory.ItemCommand

Protected Sub RepeaterDirectory_ItemCommand(By

Child control in Repeater



     I am trying to find a child control from a repeater control's child control. I have the following structure like a top control is a repeater, below which is a Panel and below this is a DateControl(custom control).

I want to find the DateControl.

<asp:Repeater runat="server"
                       <asp:Panel ID="pnlAddDependent"

                                  <xyz:DateControl runat="server" ID="dfDepBirthDate"


When iam trying like this, i am getting the "Object Reference not set error". Please help, it is urgent.

if (this.rptMembers.FindControl("pnlAddDependent").FindContro

Help with updating database with values from Repeater control using c#


Hello, I'm new to ASP.NET 3.5 with C#. I really need some help.

I used a Repeater control to create a simple (editable) list where, when a user logs in, they can edit their list of expenses.  The ASP page works fine.

 My issue is with the code-behind.  I am really confused with how to extract the values from the repeater control. The FindControl method does not seem to be working.  Also, the code I am using resets my 'Amount' values back to 0.00. (0.00 is the amount the user sees when they first encounter the page).

 Here's a portion of the code on the ASP page:

<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1"





<td><asp:Label ID="lblExpId" runat="server"  Text='<%# Bind("ExpId") %>'></asp:Label> </td>

 <td><asp:Textbox ID="lblExpense" runat="server" Width= "190px" Text='<%# Bind("ExpenseName") %>'></asp:Textbox> </td>

 <td><asp:Textbox ID="txtAmount" runat="server" Width= "100px"

Microsoft Report Viewer control to display data on one page


Hello everyone,

I am wondering if the Microsoft Report Viewer control allows for display changes.  Say for instance a user wants would like to see all the data requested then another time would like to toggle thru the pages of infomation.  So does anyone know if the control allows for display changes from complete view to paginated viewing.  I am using MS VS 2008 with ASP.NET 3.0.  Thanks for your response.


Re;Creating Dynamic Control

Hi, I have a table which stores the data like mentioned below ID Name Values 1 States Karnataka,Tamilnade,AP,UP 2 Karnataka Bangalore, Mysore, Bidar 3 tamilnadu Salem,Chennai,Pondicherry 4 AP Hyderbad,Secunderabad,Vishakapatanam 5 UP Delhi,Agra Now i have to create a dynamic controls for each and every states from the above table. A Sate Name should be dispalyed with checkbox on check of checkbox i have to enable all the cities which is again associated with the checkbox.How do i simulate this functionality using dynamic checkbox and labels. Please help me with a sample code.

Microsoft ListView Control 6.0 cannot correctly display multibyte characters when running on a 64 bi

With all the regional settings set to Russian and the OS being Russion the ListView Control 6.0 does not display the column headers correctly on the Windows Server 2008 64 bit OS. If we switch to using Microsoft ListView Control, version 5 the columns (text strings) are displayed correctly. I am concerned that using an earlier version is going to cause problems. Is there a better solution other than using version 5? Thanks!

jQuery Rating Control in Repeater - Not Duplicating per Record

Hi Everyone,There is a similar instance of this @ http://forums.asp.net/p/1380776/2919093.aspx#2919093 However I haven't had a response, maybe due to the age of the topic, but the problem is different in the sense I am not using AJAX Rating Control, I am using radio buttons contained in a Div named Ratings, which is picked up by jQuery to style to radio buttons accordingly. The output is that it will put the stars on the first record but anything after just shows origional unstyled radio buttons. Just thinking off the top of my head, but does anything need to be put in the ItemDataBound event? The jQuery for the stars etc were attained from the link below:http://orkans-tmp.22web.net/star_rating/index.html#demos=&main-menu=0&demo-tabs=3 Here is my code:.ASPX:<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Admin_Test" Title="Untitled Page" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <asp:Content ID="Content1" ContentPlaceHolderID="CPCHeader" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="AdminCPC" Runat="Server"> <asp:R

dynamic menu control call in login page

Hi ,i have declared two control in my master page , how wants to call this menu control in child page ( that is login page)i want to bind the menu control dynamically based on login previlagepublic Menu newMenu = new Menu();  public MenuItem newItem = new MenuItem("Master");

Issue with Repeater control.

Hello. I have a Repeater control which contains asp:Button control in ItemTemplate. I want to handle Button's Click event, but when I'm clicking that Button the error is thrown: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.But on other computer that piece of code is working.I set EnableEventValidation to false, but it's still not working. Please help me out. 
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