.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

How to get the last closing tag of last child

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

I can't get the end of last child, could you please help me?

I need to insert this string (@"<a href='Default.aspx?PageName={0}'>{0}</a>", sNewPageName); (5 line)
right before the </ul> tag is closed. 

XmlNode newNode = oDoc.CreateElement("li");   
XmlAttribute newAttribute = oDoc.CreateAttribute("class");   
newAttribute.Value = "doc";   
newNode.InnerXml = string.Format(@"<a href='Default.aspx?PageName={0}'>{0}</a>", sNewPageName);   
xn1.ParentNode.InsertAfter(newNode, xn1);   

This is what I get now:

<ul class="folder"><a href="Default.aspx?PageName=folder5">folder5</a>
<li class="doc"><a href="Default.aspx?PageName=new item">new item</a></li>

And I need it like that:

<ul class="folder"><a href="Default.aspx?PageName=folder5">folder5</a>
<li class="doc"><a href="Default.aspx?PageName=new item">new item</a></li>


View Complete Post

More Related Resource Links

Process.Start() Method : Dont want to close the Parent process without closing the Child


Hi there,

     I wanna call a child process to run from the parent process. In that case the parent process should not be accessible before closing the child. I nearly accomplished this stuff by using the following code.


ProcessStartInfo pStart = new ProcessStartInfo();
      pStart.FileName = @"D:\Child.exe";
      using (Process proc = Process.Start(pStart))


The above code works successfully but my problem is different. In my child application there are totally two exe's.

  1. Login.exe
  2. Child.exe

In child application generally we used to call the Login.exe to login then the Login.exe will automatically close and the Child.exe will open.

In my present scenario I have to cal the Child application from the Parent. If I used the above coding, the Login.exe is called successfully. But after logon the Login.exe will close and then Child.exe will run then the Parent.exe is available now.


So I need the Parent.exe remain unaccessible until the Child.exe is closed.



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

Display column from child table. Possible ?



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.

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

way of calling "javascript function of parent window from child window."

The article way of calling "javascript function of parent window from child window." was added by raja.s on Sunday, June 06, 2010.

Hi,Here i am going to explain how to call the javascript function of a parent window from the child window(pop-Up).Some may know before reading this post.Parent Java Script Function:script language="Javascript" type="text/javascript">

How to get child Descendants by Xdocument

xml file:-

<name>Patrick Hines</name>
<name>Gretchen Rivas</name>

Linq to xml

var Root = from feed in feedhotel.Descendants( "contact")
                           select new xmlcontact()
                               datestart = feed.Element("name").Value,

update parentpage gridview with the values from child page?


hi   i am having a gridview on each row i am having a update and add button.

on click of either of the button i am opening a popup where the end user will enter data and on clck of ok button in the child page

based on the click ie

if i clicked update i need to update that particular row with the values from child page.

if i clicked on add i need to add a row below the row where i clicked add button .

can anyone help me with this?

Closing Javascript Modal dialog window after server side event processing


Hello Friends..

Please tell me how to close Javascript ModelDoalog Window.. after Server Side event Processing .

Basically i want close window in  finally Block After sucessfulll Updation.

AMit..... InnocentInnocentInnocentInnocentInnocentInnocentInnocent

Child nodes not allowed.


Hi everyone.

I'm positive that, by now, a lot of people have run into this problem but even with all the forum posts with great answers, I still can't seem to get to the bottom of it. Here are some specs:

  • Windows Server 2008
  • Visual Studio 2008 x86

So here's the issue:

I have VS2008 installed on the server listed above. This is our development server and everything is created and tested here. I have created an asp.net application, tested it on the dev. environment and everything works great. When I try to migrate this application up to our Quality Assurance environment (which is Windows Server 2003), I get the error in the subject title.

I've read many things that can be the cause of this and I'm positive that I know 2 ways of fixing it. One is from this post: Simple web site problem on Vista, related to <providerOption>, and the other is making sure 3.5 framework is at least installed on the server in question. There are 2 reasons why I'm unable to use these 2 methods:

  • The patches from DVD that I'm supposed to install won't let me install them. Upon double clicking I recieve a message saying the "Update is not applicable to your computer"
  • I don't have permission to install 3.5 frame

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

IE closing when user try to access the document library

<!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> IE closing (crashing) when user try to access the document library in share point site.  here we are using WSS2.0.  this problem for not accursed all the users , this problem happening on some users. 

workflow and "child" records events ?




In a project, I have two lists that are linked together with a lookup column (it's not the actual scenario, but I simplify it) :

* a parent list, that defines some fields and especially a state field that will follow the life of the object (created, open and archived)

* a children list, that also defines some fields including a lookup field to the parent list and a similar state field for its own lifecycle (created, open and archived)


the life cycle of both kind of objects are linked together. For example, when the parent is opened, all children must be opened too (looks like easy because it's a workflow action from parent, and finding children is simply an activity of the workflow).

Another requirement is to archive the parent when all children are archived.

What is the best approach ?

In the parent life cycle workflow, can I monitor children events (I don't think so :() ?

I can cheat a bit by adding an hidden field "all children archived" in the parent, and set this to true from a child workflow or event. I'm not at ease with this solution as it's not a proper way. Anything else I may dive ?



Any idea, advice, tip, encouragement?



Paying back the community for its help by writing articles :

Check in dialogue does not show when closing word


In a document library that has check in and check out required a user on this network found that when they close word after editting a document, there isn't a dialogue asking whether a user wishes to check a document in.

This is how it normally works and without the dialogue there's all the likelyhood that many documents wont be checked in.

I did some testing and i found that the SharePoint drafts folder is located on a network drive. If i uncheck the box that says use local drafts folder on one of the dialogs that appear when openning a document then asks me if i want to check in the document when i close word, if i change the default location of the sharepoint drafts folder to a local folder then the dialog appears also. I can only assume there are some ACL's or File system atributes that tell word that the document needs to be checked in and those attributes are not read correctly if the document is on a network drive (perhaps ACL's are locked?).

You can change the default location with regedit or in one of the office programs so i was thinking that perhaps we could roll out a registry setting in the login script to default the sharepoint drafts folder to a local one, any other suggestions?

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