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


Post New Web Links

concatenation of same child element in xml

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

 hey friends

i have xml file

like this

<Root>
    <ele1>
    <child1>context1</child1>
    <child2>test1</child2>
    <child1>context1.1</child1>
    </ele1>
    <ele2>
    <child1>context2</child1>
    <child2>test2</child2>
    <child1>context2.1</child1>
    </ele2>
    <ele3>
    <child2>context2</child2>
    <child2>test2.2</child2>
    <child1>context3</child1>
    </ele3>
</Root>

i want  output like this

<Root>
    <ele1>
    <child1>context1;context1.1</child1>
    <child2>test1</child2>
    </ele1>
    <ele2>
    <child1>context2;context2.1</child1>
    <child2>test2</child2>
    </ele2>
    <ele3>
 


View Complete Post


More Related Resource Links

Error - "Specified element is already the logical child of another element. Disconnect it first."

  
What I have is a Grid with each cell containing its own canvas.  I have a UserControl (uc) that I want to be able to drag/drop to other cells within grid.  I was able to get my drag/drop of the uc working except for the error in the subject.  On a drag/drop of a uc, I determine the canvas the drag started in, get a reference to the uc, clear the original canvas's children and add the uc to the new canvas.  The wierd thing about this error is that it is not entirely consistent.  Sometimes, I can drag the uc around to three or four different cells before receiving the error.  I have read multiple posts about this error but I don't seem to be able 'disconnect' the uc from its original logical parent.  Help is appreciated.

Error: Specified element is already the logical child of another element. Disconnect it first. with

  
I'm building an application in which I've created several WPF user controls.  The user controls are essentially 'panels' that will hold content with controls around the outer edge.  The XAML for the main window uses one of these user controls and is attempting to set its content to two other user controls in a dockpanel. Basically, it's to place two smaller panels (one upper and one lower) inside a larger, outer panel.  (See XAML below.) I can place one user control inside the other without a problem.  But when I add the second user control, I get the dreaded: Specified element is already the logical child of another element. Disconnect it first. I really don't understand why.  My understanding of the error is that it comes from attempting to place the same element within the visual tree twice.  An element can't have two parents.  However, each of my user controls is completely separate.  Their underlying viewmodel code derives from the same base class, but each user control is separate.  I'm not even trying to place two of the same kind in there at the same time.  I thought at first that it might be that I had elements named identically in the different controls, so I renamed them so that all are unique.  It makes no difference. So far as I can tell, there are not any duplicate elements anywhere,

How to get the parent Frame from the child element.

  

Hi, All,

 

I have a Frame element in my main window, and I used its "Source" property to navigate to another "Page".

However, I could not find the way to get the Frame object again within the "Page".(Parent property just gave me null)

Could anyone please show me some solution?

Thanks in advance.


Parent-Child Dimension where the top most element has an ID of zero instead of one

  

I have a parent-child hiearchy where, when I browse it, the top most element is a sibling of the first child instead of the parent of the first child. I seemed to have narrowed down the behavior to the fact that the top most element has an id of 0 instead of 1. When the top most element id is 1, I don't get this behavior.

Is there an attribute property that I may have misconfigured to cause this behavior?

 Consider the following table:

ItemID  ParentItemID  Description
--------  ------------       -----------
0          null                 Top Node
1          0                     Child Node
2          1                     Grandchild node

 I get the following in the Browser tab for the dimension

- All Test Nodes
  - Child Node
    - Grandchild Node
  - Top Node

Notice that the "Top Node" is

InlineUiContainer removing the child to avoid the dreaded "specified element is already the logical

  

I am doing som printing.  I take a grid off my user control and pass it into a flowdocument and print.

Works great.

Now I need that grid back to put back into my user control

 dim oP as new paragraph

op.inlines.add(grdContent)   'my grid

how do I disconnect the grdContent from its parent when I am done with the flow document?


me

InlineUiContainer removing the child to avoid the dreaded "specified element is already the logical

  

I am doing som printing.  I take a grid off my user control and pass it into a flowdocument and print.

Works great.

Now I need that grid back to put back into my user control

 dim oP as new paragraph

op.inlines.add(grdContent)   'my grid

how do I disconnect the grdContent from its parent when I am done with the flow document?


me

Specified element is already the logical child of another element. Disconnect it first.

  

Given this XAML snippet from the View issuing this error.

 <ContentControl 
  DataContext="{Binding Source={StaticResource VM}}" 
  Content="{Binding Source={StaticResource VM}, 
  Path=ShowView}" />

I get the error :Specified element is already the logical child of another element. Disconnect it first.  This only happens when the Window was once displayed, then closed and reopened.  I thought a closed window get's rid of all resources. 

Any ideas on how to debug?

The Stack Trace shows me this is a NEW instance (it is dying in InitializeComponent).   I do have a Viewmodel for this window, but the content control itself is created only by the View. 


Javaman

GridView Parent Child View with JQuery Effects

  
I was just checked how to add some more cool effects to the GridView control using JQuery. In this post I will display parent-child data in the GridView control with some help of the wonderful JQuery library.

Let's first populate the GridView control.

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

UpdatePanel is not a known element - message when upgrading to 1.0 ajax

  

It worked on one of my old pages.  I change the web.config, renamed all the <asp.

On some aspx page it doesn't recognize the updatepanel.  It only does on one page.  If I create a new aspx page with a different name - then it works.

Should I just create a new web project ajax - then copy all my code into there?  Or is there a way to get those old pages to recognize the new ajax controls?


Display column from child table. Possible ?

  

Hello,

I'am using dnamic entity with EF4. On a list page of a table, I would like to display a column containing information from a child table of the current element. Sample :

Order List :

Order Data | Required Date | Shipped Date | etc... | ... | Customer Name (foreign key with tostring() method override) | Customer Postal Code (Column that I want to add) |

I don't known how to do that. Is it possible ? Maybe I have to to create my own Metadata proxy that will add dynamicly a column on the MetaColumn list of the table.

Does someone have an easier or better idea ?


Thank you for any help.


get value from xml element

  

HI

i have this xml

<Field Name="Users_wff_AU" Type="FIELD_TYPE_STRING" MultiValue="True">
<Value No="1">xyz</Value>
<Value No="2">abcl</Value>
<Value No="3">xcc</Value>
</Field>

i want to get the  xcc in string variable

Dim strwfUser As String = xNode.Item("Value").InnerText


Could not find default endpoint element that references contract 'CurrencyProxy.CurrencyServiceSoap

  

Hi,

I created 2 projects in my solution:

  1. Classic asp.net web service (asmx)
  2. Class library project which references service
  3. web site project which references class library project
  4. Windows app project which references service.

Both projects were created in 3.5 framework and in Visual Studio 2008 Beta 2.

I added web service reference to Class library project. When it asked for namespace I typed "CurrencyProxy". Projects build ok, but when I run web app, Class library throws an error: Could not find default endpoint element that references contract 'CurrencyProxy.CurrencyServiceSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

I believe it has something to do with app.config in Class library project. Here is part from app.config:

 <system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="CurrencyServiceSoap" closeTimeout=

Display homepage node along with child nodes

  

If the first Sitemap node is your homepage/default and all other nodes are supposed to be children / grandchildren of the first sitemap node in a web.sitemap, how do I set up my web.sitemap to enable me to display my cssFriendlyMenu with the homepage node along with the nodes that are 1 level down from it at the same time as in :

Home   Products   Services   About us

 

...or is it not possible to have the first sitemap node displayed along with the nodes that are 1 level down from it?  Do I need to have a different starting node rather than my homepage node?


'element.className' is null or not an object

  

 Hi,

I just downloaded the project, compiled it and ran it right out of the box and when I put the mouse pointer over or remove the mouse pointer from either MenuItem in the menu demo, I generate this error:

'element.className' is null or not an object

It points to this javascript method:

updateClassName: function(operation, element, name, value) {
        this[operation + 'String'](
                function() {
                    return element.className;
                },
                function(newValue) {
                    element.className = newValue;
                },
                value
          &nbs

Modify Menu adapter to show selected

  

Hey, I need some help modifying the menu adapter code to give child <ul> elements a class value indicating that the parent is selected. It should render like this:

 

< ul class="AspNet-Menu">
	< li class="AspNet-Menu-WithChildren  AspNet-Menu-ChildSelected">
		< a href="/rockit/admin/Default.aspx" class="AspNet-Menu-Link  AspNet-Menu-ChildSelected">
		< span>Mypage< /span>< /a>
			< ul class="AspNet-Sub AspNet-Sub-Selected">
				< li class="AspNet-Menu-Leaf  AspNet-Menu-Selected">
					< a href="/rockit/admin/Default2.aspx" class="AspNet-Menu-Link  AspNet-Menu-Selected">
					< span>Test< /span>< /a>
				< /li>
				< li class="AspNet-Menu-Leaf">
					< a href="/rockit/Default3.aspx" class="AspN

How to keep the hover for Parent menu and set the selected menu item css for child menu item?

  

Hi,

I'm using cssfriendly control adapter for menu. My asp.net menu control's datasource is a sitemap file I'm using which contains all the urls.

I have the following questions:

  1. Is there a way to keep the parent menu item hovered while hovering over the respective child menu items?
  2. Is there a way to keep the child menu item selected? I am able to set the css for the parent menu, however I was wondering if the same is possible with the child items.

Please help! Smile

Thanks,

Moneka Smile



Categories: 
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