.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

about error in child node in menu

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


I created menu control and child nodes in .aspx page.i created childs also. where i created childs it is displayig "expand" instead of child name. the links has not working.but running it will run without error but displaying like the follwing.i didnt do any formatting simply created a menu.

Please help me to solve it.




Skip Navigation Links

Company Details
Process Owner's Details Expand Process Owner's Details

View Complete Post

More Related Resource Links

Display error if a treeview root node contains a child node

I am having a treeview initially with a root node when form is loaded. I will add child node as some.txt file at the runtime by selecting an option as Addnew from contextmenu which was displayed when the user right clicks on the root node. Now what i need is if the tree has child node appended to the Root and if user tries to create a new node by clicking the option addnew from context menu i would like to display an error as only one child allowed.   Can any one help

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?

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



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


Moneka Smile

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.

SSIS Package Protection Level Errors - decrypt protected XML node "DTS:Password" with error 0x800900

Error 7 Error loading GetData.dtsx: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.   c:\Packages\GetData.dtsx 1 1  Error 8 Validation error. Data Flow Task: OLEDB Source [5310]: The AcquireConnection method call to the connection manager "SourceServer" failed with error code 0xC0202009. GetData.dtsx 0 0 Environment I need to execute - BIDSHave Solution, with files linked with VSS. When I click on package, aforesaid errors show up and package opens in designed.Protection Level : Encrypt Sesitive with User KeyThis means it'd run only on machine and by user where and who created respectively.So I changed it to Encrypt Sesitive with Passoword and provided Passoword. No luckSo I changed it to Do not save sensitive, as anyways in the connection manager, it has Expression saying @Variablename (with appropriate correct syntax), and variable is mapped to config file. I tired with Config file and also by hardcoding the value in the connection manager's connection string after removing the variable name, also tried by hardcoding value in variable value and disabling config file.Nothing works. I read 3 threads discussing this issue by othe

Script error when opening document menu

Hello,   Two of our MOSS users found strange problem when they tried to open or edit document in document library. When they try to open document menu, IE gives error:   Internet Explorer Script Error Line: 578 Char: 1 Error: Object expected Code: 0 URL:  http://<servername>/<sitecollection>/<site>/<documentlibrary>/AllItems.aspx   Do you want to continue running scripts on this page? Yes / No   Can anyone help me what to do? Users cannot do anything with documents now.   Best Regards Toni

Help needed on XPath Error: System.Xml.XPath.XPathException: Expression must evaluate to a node-set.

Im trying to determine if a value already exists in an XML file. In this case I want to know if there's a node "id" with value 3. But I cant figure out how...XML:<root><data><compare><locations><id>3</id><id>5</id></locations></compare></data></root>XSL:xmldoc.SelectSingleNode("//root/data/compare/locations/id=""3""")Error:XPath Error: System.Xml.XPath.XPathException: Expression must evaluate to a node-set.

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,

SQL Server 2008 R2 management studio throws an error when opening SQL Server Logs node

Hi all, I've installed SQL Server 2008 SP1 CU9 developer edition and SQL Server 2008 R2 Express side by side on my machine. When I try to open/expand SQL server logs node under Management on developer edition instance, I get the following error message: ********************************************************************************** TITLE: Microsoft SQL Server Management Studio ------------------------------ Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ A severe error occurred on the current command.  The results, if any, should be discarded. (Microsoft SQL Server, Error: 0) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.2789&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476 ********************************************************************************** The SQL Server Management Studio version is 10.50.1600.1 SQL Server 2008 SP1 CU9 version: 10.0.2789.0 SQL Server 2008 R2 express edition version: 10.50.1600.1 RTM   I don't get that error when expanding SQL Server Lo

Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil' in asp.net mvc

I am getting following error in production but the same is not a repro in in local.> Error executing child request for> handler> 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerWrapper'.> Inner Exception: Exception of type> 'System.Web.HttpUnhandledException'> was thrown.Stack Trace:    at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)    at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage)     at System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm)    at System.Web.Mvc.ViewPage.RenderView(ViewContext viewContext)         at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)         at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass14.<InvokeActionResultWithFilters>b__11()    at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)     &

delete node based on child value

Trying to delete a node via linq to xml but don't seem to be creating my query just right. My xml looks like this: <Index><Document>    <FriendlyName>test</FriendlyName>    <ID>f1eb6439-56dc-4f8a-a02a-c97706646643</ID>    <Post>True</Post>    <Department>Clearance</Department>    <Category>Information</Category>    <Audience></Audience>    <Link Type="Page" Target=""><![CDATA[]]></Link>    <Keywords></Keywords>  </Document></Index>   I know the ID that i want and is stored in variable myID Now I need to search my xml & find the entry that matches myID Then delete the entire Document element & all child nodes.   Here's what I've been playing with but it's just not quite there. myxmldoc.Elements("Document").Where(s => s.Element("ID").Value == myID).Remove();    Thanks ahead for the help!

Object Reference Error While Rendering Menu Control


I am having a problem with rendering a menu control inside a server control. I am getting an error in the RenderContents override method when I try to render the Menu Control. The error I am getting is an Object Reference error. The code is below...

[ToolboxData("<{0}:Login runat=server></{0}:Login>")]
    public class Login : CompositeControl
        #region Members

        Label tst;
        Menu loginMenu;
        MenuItem mainLoginItem;
        MenuItem loginItem;
        MenuItem usernameItem;
        MenuItem passwordItem;
        SubMenuStyle subMnuStyleControl;
        SubMenuStyle subMnuStyleMenu;

        bool isLoggedIn = false;


        #region Properties

        public bool IsLoggedIn
            get { return isLoggedIn; }

            set { isLoggedIn = value; }


        #region Overridden Events

        protected override void RenderContents(HtmlTextWriter writer)



        protected override void OnInit(EventArgs e)

            #region Add CSS references
            string cssUrl = Page.ClientScript.GetWebResourceUrl(this.Ge

Error Adding 2nd Cluster Node - Account Name Box Greyed Out


I am in the process of setting up a 2008 R2 SQL cluster using SQL 2008 R2.  I have the first node up and running, and all is well.  Going through the process to the add the 2nd node, I am stuck.

At the part where you configure the SQL service accounts, the SQL server agent account is greyed out.  Hovering your mouse over it shows that field as "Read-Only"  The box for the password you can type in, so I went ahead and put in the password I used for the account on the first node.  (it's a domain account with the corect privledges).  On the database engine section it lets me select my domain account and then I put in the password.  Clicking next gives me an error stating that the "Credentials you provided for the SQL Server Agent service are invalid."  

I know the password is correct, but without the accout name box being greyed out, I am not sure it is pointing to the right account.  Other people too are having this issue:  http://social.msdn.microsoft.com/Forums/en-US/sqlsetupandupgrade/thread/aae80395-7d29-4a07-a1b7-29959e78d382   What is marked as a solution on that thread really isn't.  Follow up posts show other people at the same spot I am.

Add to xml node as a first child


Hi Folks,

I am new with ASP.NET, trying to build an application with the help of googling, now in XML section when I am updating my XML dynamically, by default the node would be added after the last node, I want to add it as a first child (as first child of <total> so that I can save sorting portion at data grid. Please have a look on the code and suggest me.




protected void BtnSubmit_Click(object sender, EventArgs e)


            string xx="", yy="", zz="",
            datacable = "",
            charger = "",
            issued_by= "";
            LblSummary.Text = "";
            Lblmsg.Text = "";

Displaying + on treeview node even when no child nodes are present


I have a treeview control that is working great, except that I would like the behavior of some nodes to display the + even though no child nodes exist yet. Meaning, I want my treeview control to look like this:

- RootNode
    + Node1
    + Node2
    + Node3

However, Nodes 1, 2, and 3 do not have any child nodes. From what I can see the + or - does not display if there are no child nodes, but I would like to see the + appear even though there are no child nodes. I want to do this because I want to create the child nodes upon expanding the parent node (Node1 for example).

Is this possible?



Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B



I have developed several SSIS packages with the last Beta of VS2005 / SQL Server CTP. After the public release I tried to uninstall the CTP-Versions to install the msdn finals but this time I got lost and was not able to satisfy the requirements of the final setup of VS2005. So I decided to install the whole pc again and after some hours I had a clean machine (XP with latest SQL Server 2005 Standard and VS2005 Professional).


Now I have tried to open my SSIS-Project but getting the following error:


Hide a node from appearing on menu not on breadcrumb (using SqlSiteMapProvider)



I am using wicked code sqlsitemapprovider and it's VB version. Most of the things are going OK! But when I wanted to hide some of the nodes from appearing on menu while staying shown on sitemappath I cannot figure it out. I tried to change the sqlsitemapprovider code but was unsuccessfull. I have found David Sussman's answer. but it was for a .sitemap file. So how can I manage to do the same with the sql sitemap provider mentioned above.

I added a column named visible to my SiteMap table it's type is bit and then I have done these changes (Sorry for such long code):

Imports System
Imports System.Web
Imports System.Data.SqlClient
Imports System.Collections.Specialized
Imports System.Configuration
Imports System.Web.Configuration
Imports System.Collections.Generic
Imports System.Configuration.Provider
Imports System.Security.Permissions
Imports System.Data.Common
Imports System.Da
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