.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

Nested Tracers - is there a way to only log the outer trace?

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net


I have some nested tracers. The outer one has a category of 'PageTrace' and the inner ones have categories of 'DBTrace'. When I set the outer category source to 'All' I get both traces. When I switch on the inner trace, I just get the inner trace.

So, my question: is there any way to just log the outer trace events, i.e. the Page Traces.




View Complete Post

More Related Resource Links

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

Binding Nested Listviews in MVC ViewPage


I am a longtime .NET developer but for big applications and services.  This is my first asp.net project and I have chosen MVC.   I have a need for nesting a ListView within a ListView.  In this simple catalog app, I have EF 4 Entities that are Categories, SubCategories, ItemTypes, and Items.

My goal is to display a 5 column layout of SubCategories with their ItemTypes below them in a ViewPage.  I did just fine with it done out in C# as server directives such as:

    var subcats = Model.SubCategory.ToArray();
    var nrSubCats = subcats.Count();
    var rows = (nrSubCats/5) + (((nrSubCats % 5) > 0) ? 1 : 0);
    for (var row = 0; row < rows; row++)
    { %>
        <div style="width: 100%; float: left; clear: right;">
        var start = row * 5;
        for (var i = start; (i < start + 5) && (i < nrSubCats); i++)
        var subcat = subcats[i];
            <div style="float: left; clear: right; width: 20%; margin-left: 5;">
                <h2> <%:subcat.Name%></h2>
                    foreach (var its in subcat.ItemType)

MVC2 issue - Stuck. Trying to create a cms with nested partials


I am currently trying to display multiple items on a single page. I am not sure as to how to tackle this. What I have is a database table that has all the page data in. I have this run as a PagesController and this works fine. However what I would like to do is, if say the Products page is selected via the menu, I want to pull back not only the Products page html but also get all the products, and even be able to pull them through via category. I was trying to use a partial view, but I can't get it to work. The same would be for other pages, having partial views to display the other content, ie if Gallery is selected, the page html for Gallery shows and it then can push to a partial view that pulls all the gallery images from the gallery db table and so on. 

Maybe I am tackling this the wrong way. I have the pages stored in the db to allow for a CMS system I have setup. Maybe I need to use models for all the other items(Products, Gallery, Videos and such) and use the partial for the page html?

Any help would be greatly appreciated as I am confused.

LDAP nested groups filter


Hi all,

In my organization we use nested groups.

For a particular usage, we have a group (let's assume that the group name "kuku"), and the names of all the nested groups under it contains "kuku" as well.

We may assume that no other group in the LDAP has "kuku" in the name.

I need to create a filter which will return all the users which belong to one of the "kuku"s group.

Obviously, using this filter will bring only the head kukus

(&(&(objectclass=user)(objectclass=person))(memberOf=CN=kuku,cn=.rest of the group DN.))

How can I use wild card to fetch all users which belong to any kuku?

For example: (&(&(objectclass=user)(objectclass=person))(memberOf=CN=.*kuku.*))



Editable multiple nested gridview


Greetings everyone,

I've got this page where I display a 3 level nested gridview. First gridview displays data, 2nd one displays data based on the 1st one's row and 3rd one displays data based on the 2nd gridview. All of this works perfectly, including the edit mode for the 3rd gridview. 

The issue comes when I make each gridview collapsible, again, it works fine but when I click on "Edit" on the 3rd gridview all the grids collapse, I can then re-open them and the "edit mode" is still present and I can still save my updated data. But that collapsing thing is quite annoying.

I based a lot of my code from this page: http://www.codeproject.com/KB/webforms/EditNestedGridView.aspx

And I understand how I can fix my issue on a 2 level nested gridview, by simply adding the C# code:

protected void GridView2_RowEditing(object sender, GridViewEditEventArgs e)
            GridView gvTemp = (GridView)sender;
            gvUniqueID = gvTemp.UniqueID;
            gvEditIndex = e.NewEditIndex;

This makes allows me to save the index and prevent it from collapsing when I'm editing. Unfortunately, because I'm actually editing the 3rd gridview, if I code:

Create databound nested ajax toolkit accordion programatically(In code Behind)


Can anyone guide me in the right direction or give an example of How I would accomplish this?


I have  this so far but kind of stuck on how to do it programtically if I'm using header and content templates 

I have a xmldatasource.. In a nutshell at what point in my code do I need to create a new accordion? does it need to be

in the item_databound handler?


Imports Microsoft.VisualBasic

Public Class AccordionTemplate
    Implements System.Web.UI.ITemplate

    Dim templateType As String

    Sub New(ByVal type As String)
        templateType = type
    End Sub

    Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) _
          Implements System.Web.UI.ITemplate.InstantiateIn

        Dim ph As New PlaceHolder()

        Select Case (templateType)
            Case "Header"
                Dim myLabel As Label = New Label()
                myLabel.Text = "Test"
            Case "Content"
                ph.Controls.Add(New LiteralControl("<p>hello</p>"))
        End Select
    End Sub

End Class



Partial Class Accordion
    Inherits System.Web.UI.Page


How can i access my nested info?


I have a web service that returns information about master projects. Within the return i also get all of the sub project information. I have been using the Applications definition designer to create the ADF. It all works fine accept i cannot access the sup project information in any of the BDC web parts. All i get under the "Projects" variable is BDC.ProjectData[].

How can I access this data? I am using the standard SharePoint BDC web parts.

I have edited the XSL to dump out the xml being send and can see that instead of the projects section containing the expected information it says BDC.ProjectData[] along with another variable ___serializedId. So i suspect its an issue with my ADF but i am completly stuck.

Here is a sample of the web service return

    <MasterProjectTitle>PB test 1</MasterProjectTitle>
    <SupplierId />
    <Country />
    <MasterProjectClass>SNG Vehicle</MasterProjectClass>
    <IncoTerms />

Display a nested child ListView on PostBack while using DataPager on parent ListView


Hello ASP.NET community,

I am having trouble finding how to solve the following issue :

I am using nested listviews to display Sales and Sales details.

The main ListView displays General Information about Sales and the child ListView displays the detailed information about one sale. the child listview is shown only when the user clicks on a link (see included code, DataBind is made on PageLoad) :

ASPX Markup Code :

<asp:listview id="lvSales" runat="server" onitemdatabound="lvSales_ItemDataBound">
<table cellspacing="0" border="1" width="250" style="border-collapse:collapse;">
<tr runat="server" id="headerRow">
<th scope="col" style="width:30px;"></th>
<th scope="col">SaleNumber</th>
<tr id="itemPlaceHolder" runat="server" enableviewstate="true"/>
<tr id="row" runat="server">
<td style="text-align:center;"><asp:button id="btnShowHideDetails" runat="server" oncommand=&qu

Nested listview fk-problem with insert



My problem is this, i have a nested listview that works fine but if i need to do an insert and the nested listview dont have retrived any values (that is no posts created) i cant get hold of the fk that i need. If i put a hiddenfield in the parents listview with the fk how can i find it in codebehind when i do an insert? 



Local Report - nested objects



I trying to use Object data source for my local report. But the problem is that the datasource is having nested objects and I am not able to access the properties of the nested object.

I tried using =Fields!HomeAddress.Value.Zip as mentioned on this site


but couldn't get it working. Its returns #Error for this field.

I am using visual studio 2010 for developing this report

Please help.






Using an Application Resource in Nested UserControl

Hello This problem has been niggling me for months and I just can't seem to get to the bottom of it. I have a UserControl, let's call it 'UC_List', and the ListBox in it uses a Style which I have declared in my Application.xaml file. When working with UC_List.xaml everything seems fine. I then place 'UC_List' into a UserControl, let's call it 'UC_Summary'. I have declared the namespace at the top of UC_Summary.xaml. The xaml code in UC_Summary now has an Error: Could not create an instance of type 'UC_Summary'. Now I cannot see anything in the Design window, only a warning saying 'Problem Loading, the document contains errors that must be fixed...' However when I run the application everything works fine! After a lot of trial and error I found that the cause of the problem seems to be the Style referenced in the Application.xaml. If I declare the Style in UserControl.Resources at the top of UC_List the error goes away and the graphics in UC_Summary return. I've so far duplicated my Styles into individual UserControls to work around the problem but this could easily lead to inconsistancies. If anyone can suggest anything I would be really pleased to try it. Thank you. Regards Chris

Debugging Stack Trace

I have a VB.net dll that gets loaded as an add on to AutoCAD. I have it setup so that all exceptions get logged in a database table, along with the stack trace. The dll is on several users computers now for testing. On some computers, the stack trace returns line numbers, which is very helpful. Other computers do not give the line numbers on the stack trace for some reason. All computers are automatically updated, so they always have the same version of the dll. The DLL is built with full debug information. Do you know why some computers would return the line numbers and others would not?  

repeating merge joins using full outer join - should be possible without sort, but cannot get the co

Hello,   I am trying to combine several source tables with Merge Join.  For the Moment I have three source tables all already sorted in the source query and the is sorted property with the correct keys set. (its an aggregate query with group by and sort by the key columns) Then I do a merge join between two of the tables - with a full outer join. Then I just want to do another merge join with the output of the next result. but as the merge join do not combine the key columns into one column I need to add a derived column which substitute null values on the left side of the join with values from the right side of the join. The second merge then says only the left columns of the first merge join is sorted, but not the comined columns. If i Replace with a derived column the left side primary key columsn with the combinded key columns the next merge join says the input is not sorrted? But the output must be sorted. So how do I get the next merge join working without the ssis sort transformation? the data is sorted, but the component does not recognize the sorted data? I do not want to use (can use) the sort because there are flowing >= 500 Mio. records through the pipeline. Any help appreciated.   Hanneshttp://www.hmayer.net/
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