Adding,Deleting and modifying the xml file using tree view control



  • 1. Add COM+ Reference to C#.NET Assembly
    Mike001, The reason this is happening is that TLBIMP sees that the type library is for an existing .NET assembly. Because of this, you should just add a reference to the .NET assembly itself, and not to the type library used to expose the object to COM. Hope this helps. -- - Nicholas Paldino [.NET/C# MVP] - XXXX@XXXXX.COM "Mike001" < XXXX@XXXXX.COM > wrote in message news: XXXX@XXXXX.COM ... > I'm new to C#.NET and am building a windows service program. I have been given a COM component (also created with C#.NET), which I've registered on my local machine using RegSvcs. > > I am having difficulty adding a reference to this COM component in my project. In the Add Reference dialog, the component does not appear in the list. When I browse to the folder where the DLL and TLB files exist and select the TLB file (which was generated by RegSvcs) I get the error: A reference to 'X.tlb' could not be added. Converting the type library to a .NET assembly failed. Type library X was exported from a CLR assembly and can not be re-imported as a CLR assemby. > > Does anyone know what this message means and what I need to do differently to add the reference to my project? > > Thanks
  • 2. Custom validation
    Hi! I've been experimenting with server side custom validation and I can't make it work. I have a text box which I'd like to validate by sending the content to a web service which will check it and return 0 or 1. I've added a custom validator control in VS .Net 2003. The code looks like this: <asp:CustomValidator id="CustomValidator1" runat="server" ControlToValidate="CVRNummer" ErrorMessage="TEST"></asp:CustomValidator> By double-clicking the control the follwoing was added in the code-behind file: private void CustomValidator1_ServerValidate(object source, System.Web.UI.WebControls.ServerValidateEventArgs args) { } I've tried to add all sorts of things to this Sub to make something happen but so far nothing has worked. My last attempt was this: private void CustomValidator1_ServerValidate(object source, System.Web.UI.WebControls.ServerValidateEventArgs args) { Label3.Text = "TEST"; } which unfortunately didn't give me the expected result. Can someone help me out here? Best regards Morten
  • 3. How to create dependant properties???????
    Hi all, I'm creating a simple user control that has two properties that represent a range of valid integer values. For example: int minimum, maximum; public int Minimum { get { return mimimum; } set { minimum = value; } } public int Maximum { get { return maximum; } set { maximum= value; } } // P.S. I've deliberately made this simple to avoid cluttering code. Using the properties window, I would like the programmer to be able to set the minimum and maximum values to a proper range - for example Minimum = 400 and Maximum = 800. The rules are that the minimum value must be <= to the maximum value and the maximum value must be >= to the minimum value (a circular dependance on each other). Thus, setting the properties to Minimum = 800 and Maximum = 400 would be illegal and the code would prevent this. Does anyone know of a way of doing this using two separate properties or can it be done with one property or some other method I may have overlooked? Any ideas would be appreciated. Regards, Paul
  • 4. System.Web.Mail namespace problem, not having IBodyParts interface
    Hi, we are porting an existing VB/COM application on .NET. This application is typically a mailing engine. For sending mails it uses CDO. As part of development in .NET we are using System.Web.Mail namespace. Mails can have attachments also of different types as word files, html files etc. But there is a case when a previously sent mail need to send as attachment in the new mail, means attachment type is an Outlook item. For this existing application uses IBodyPart interface and function SaveToObject, but THERE IS NO CORRESPONDING FUNCTION OR CLASSES in .NET library, and we dont want to use COM interop to use CDO library. Is there any possible way to do that, without using any COM libraries. Thanks in advance Brajesh Jain

Adding,Deleting and modifying the xml file using tree view control

Postby gugan » Thu, 08 Jan 2009 14:06:25 GMT

In my project i have a requirement of using the xml file to create the tree view control. I have problem in deleting the elements of the xml file.
can anyone suggest a solution for this.

Thanks in advance!!!

EggHeadCafe - .NET Developer Portal of Choice 

Re: Adding,Deleting and modifying the xml file using tree view control

Postby Anthony Jones » Thu, 08 Jan 2009 18:33:57 GMT

Use System.Xml.XmlDocument.  Load file into object with Load method.

Use SelectSingleNode with XPath to find the element you wish to delete.

XmlNode elemToDelete = dom.SelectSingleNode("xpath here");

Anthony Jones - MVP ASP/ASP.NET

Similar Threads: to bind tree view control in the datagrid cell using & c#

2.ASP.NET 2.0 Tree Control and Navigation Controls - General Question


Why is it practical to have the ASP.NET navigation controls based on
XML?  I would love to just use databinding and then be able to
dynamically update the navgiation menu (e.g. for a  product list).

I tried to use a dropdownlist with hyperlinks for navigation (not the
main navigation -- a navigation subset) and even a listbox, but found
it very cumbersome.

The way I figure it now, is that I have to pull the data over from Sql
Server, convert it to XML, reformat into the appropriate nodes, and the
then populate the navigaiton control..

Is there an easier way to do this?  What am I missing??

Thanks in advance!

3.How to bind data to tree view control

Dear all i am using IE tree view web control i want to bind datad to it
can any body tell me 
how i can bind?


4.Wrapping Text in Tree View Control in ASP.Net

Can anybody please help me in getting the node text wrapped if the length is 
longer then the tree view width.Currently it shows the scroll bar which i 
dont require.

5.ASP.NET Tree View Control

Dear All,

Can anybody tell me is there any Tree Control for ASP.NET for using in 
Version (1.1)  if so can you kindly send me the link to my mail id 

Thanks and Regards,

6. How To Create The Tree View Control(Sam)

7. Asp.Net MS IE tree view control font changing problem

8. Asp.Net tree view control font problem

Return to C#


Who is online

Users browsing this forum: No registered users and 60 guest