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

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

Nested Multiview control!!!

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


Actualy i need something like,lets say my main pg has got 3 tabs(Tab1,Tab2,Tab3)..when i click on Tab1,i will have to show Below 4 tabs names Tab1A,Tab1B,Tab1C and Tab1D,similarly Tab2,have to show below 2 Tabs....


how to achive this gimme some sample code to do this using Multiview / or any other soluton.




View Complete Post

More Related Resource Links

Accessing a public property of a nested user control in a master page from a pages' user control

Hi  I've got a web site that has a master page and that master page (mpMaster that has a user control (ucControl1) which has a sub user control (ucControl2), this user control has a property which accepts a value. Now, I have a page that uses the master page and on this page I have another user control (ucPageControl), I need to  find a way of setting the value in ucControl2 from ucPageControl. Is this possible at all? Many thanks Ed

Dynamic nested control not persisting data


Hi, I'm trying figure out how to make a control that can have controls nested inside it. I've made a jQuery tab browser class which uses a hidden field to remember which tab is selected and create the relevant client script to re-select it on postback...it works fine...

This is for web part development so all controls are created dynamically.

The problem is when I add a control to one of the tabs, the values set in that control disappear on postback..I understand there is a lot of information about user controls, viewstate and control state but nothing seems to give me access to those values...

I've boiled it right down to the basics and still can't get it to work unless the custom control has all its controls added in OnInit...which is bad news for me because I need to instantiate the browser, the use a 'AddTab' method to add tabs and controls to them, which occurs after the OnInit event and therefore I can't access the postback values

Object reference not set to an instance of an object in Nested Repeater Control of CheckBox List con

 if ((item.ItemType == ListItemType.Item) || (item.ItemType == ListItemType.AlternatingItem))
                Repeater rptsub = (Repeater)item.FindControl("rptsub");
                CheckBoxList Chksub = (CheckBoxList)rptsub.FindControl("Chksub");
                Label lblsubroot = (Label)rptsub.FindControl("lblsubroot");
                DataRowView row = (DataRowView)e.Item.DataItem;
                RootId = Convert.ToInt32(row["IdApplication"].ToString());
                MetadataPermissions metadataPermissions = new MetadataPermissions(); ;
                DataSet rptRootValues = new DataSet();
                rptRootValues = metadataPermissions.GetrptSubMenus(RootId);
                DataRow[] drows = rptRootValues.Tables[0].Select("IdApplicationroot = " + row["IdApplication"].ToString());
                foreach (DataRow chkpermsns in drows)
                   ListItem li = new ListItem(chkpermsns["PermissionName"].ToString());


<asp:Repeater ID="rptroot" runat="server" OnItemDataBound="rptroot_ItemDataBound">

How to bind GroupBy Values in Nested Repater Control


In a dataset i m getting values like this

IdApplication    ApplicationDesc    Permissions

1                       User                      Add

1                       User                      Delete

1                       User                      Update

2                       Role                       Add

2                      Role&n

I need to Group Elements in Nested Repeater Control



User Group Management
User Groups Add  Delete   Edit  View  Activate/Deactivate  Export
User Management

Nested control's events not firing in UserControl


Hello I have a weird issue. I have a user control which I load dynamically using LoadControl. In this UserControl I have a button with assigned OnClick event, but when I click that button, the event is not fired. I'm populating the user control in UpdatePanel's Load event (I invoke __dopostback from JS).

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ServiceInput.ascx.cs"
Inherits="uPay.UserControls.ServiceInputs.ServiceInput" ViewStateMode="Disabled" %>
    <div class="PopupFoot">
        <asp:Button ID="btnAdd" CssClass="PopupADD" runat="server" OnClick="btnAdd_Click" />

    protected void btnAdd_Click(object sender, EventArgs e)
        //Method never gets called :/

 Here I load user control in the page

protected void ServicesUpdatePanel_Load(object sender, EventArgs e)
        string arg = Request.Params.Get("__EVENTARGUMENT");
        if (arg == "ServiceInput")
            int serviceId;
            if (Int32.TryParse(hdnSelectedService.Value, out serviceId))
                using (Entities db = new Entities())

v3.5 Ajax ToolkitScriptManager Extender Control not working in Nested Master Pages


I am using v3.0.31106.0 of the AjaxControlTookkit.dlll.  I have nested master pages.

The site Master page has the only ScriptManager & holds the oneColumn & twoColumn master pages.
The twoColumn master page holds content pages. In the content page there is a update panel.

Here is my Site Master Page:

<%@ Master Language="VB" CodeFile="SiteMasterPage.master.vb" Inherits="SiteMasterPage" %>

<!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">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    <div><h2>Main Master Page</h2>
        <br /></div>
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

Here is the Nested Master Page:

Nested GridView Control returns "Object variable or With block variable not set" when outer GridView


Nested GridView Control returns "Object variable or With block variable not set" when outer GridView returns rows.

The Nested GridView Control works as long as the outer GridView returns rows, the following code works:


Protected Sub GridViewReport_RowCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridViewReport.RowCreated

          If e.Row.RowType = DataControlRowType.DataRow Then

                 Dim myStatus_ID As SqlDataSource = CType(e.Row.FindControl("sqlDeviceStatusAssign"), SqlDataSource)
                 If Not e.Row.DataItem("Status_ID") Is Nothing Then
                                  myStatus_ID.SelectParameters(0).DefaultValue = e.Row.DataItem("Status_ID")
                 End If

       End If

asp:LoginStatus control with nested ?



Is it possible to place a nested span inside

an <asp:LoginStatus /> control? 

So instead of just...

<a id="LoginStatus1" href="javascript:__doPostBack('LoginStatus1$ctl00','')">

you would have...

<a id="LoginStatus1" href="javascript:__doPostBack('LoginStatus1$ctl00','')">
<span class="myCustomSpan">Logout</span></a>

scrollviewer not working in nested User Control


The code below illustrates my problem: I cannot get the scrollbars in the embedded User Control (ucScroll1) to show up when I resize the main window (Window1) smaller.

It won't work even if I force the issue by defining it like this:
<ScrollViewer HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" IsEnabled="True" >

<UserControl x:Class="ScrollViewerApp.ucScroll1"



 Height="100" Width="300">

 <StackPanel VerticalAlignment="Top">

  <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" >

   <StackPanel Background="Aqua">

    <TextBox Width="100" Mar

Find Control inside a View of Multiview using Javascript (document.getElementById)



i am using the multiview control inside a page and i am trying to find a control using the javascript function document.getElementById. My Problem is that the function returns null cause it cannot find the control. When i open the code of the page from the browser the active view is not rendered so I think thats the reason why I am getting a null value from the function. 

On the HTML code is rendered only the first view or the view that is activated on page load.

Is there any way to find a control inside the view using javascript? or I am doing something wrong?

Thanks a lot.

Bind nested grid view and find value from control within nested grid

The article Bind nested grid view and find value from control within nested grid was added by ramkrishnsaini on Wednesday, December 29, 2010.

Introduction: In this article i'm posting "How to bind nested grid view and work with nested control with nested grid view".Binding nested grid and work with any control of nested grid view is something different than normal grid view. In

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.

Accessing the different controls inside a GridView control

how we can access a particular control which resides inside a GridView control. In this article I will show you how you can access different controls inside a GridView control. We will see how we can access a TextBox control, a DropDownList control and a ListBox control. If you are working with ASP.NET 1.X then you might want to check out my article Accessing Different Controls Inside a DataGrid.

In-Depth look at the GridView Control

In the last article we looked at few of the new controls available in Asp.net 2.0. We also talked about Grid View Control which has replaced the Asp.net 1.1 DataGrid control for good. In this article we will examine more features of the Grid View control. In this article we will see some of the common operations that can be performed using the GridView control. Apart from these operations there are many more functions that can be performed on the control and which we will see in the later articles

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.
Users Add  Delete EditViewActivate/DeactivateExport
Roles Add  Delete EditViewActivate/DeactivateExport
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