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


Top 5 Contributors of the Month
Kaviya Balasubramanian
Imran Ghani
Post New Web Links

Collapse all the nodes on load in XSLT

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :ASP.Net
 

I have created an xslt file to format xml file. My ewquirement is to show that xml in a tree format. That I have achieved. But, when I click on the root node, it will show all subnodes(which are by default expanded). I want all subnodes need to be collapsed by default on clicking of root node. Similarly, on clicking of subnode, it should be expanded with contents and subnodes of this node to be collapsed by default and so on.

How can I achieve this? 




View Complete Post


More Related Resource Links

Create a Tree view with expand or collapse using XSLT

  

I have created an XSLT file to show the contents of xml in HTML format in the form of a tree. Now, my requirement is to add expand or collapse capability to this output(html) using XSLT and Javascript. The sample output looks like this:

Resource Center

  • Home
    • Resource Center
    • List of Resource Types
    • How to Load XML file and XSLT file

        

      I want to load an xml file from webservice and xslt file from my project. And then translate xml and want to use xml value as .Net Object.

      In this sample xml, I want birthTime as the .net String object.I want to translate this xml by my xslt file and want to get data from object.


      <Patient>

          <birthTime>John</birthTime>

          <ageInWeeks>Doe</ageInWeeks>

      <Patient>


      Any Idea?



                  XmlTextWriter writer = new XmlTextWriter("VMR.html", null);
                  myXslTransform.Load("http://localhost:15408/DAL/VMRLoader.xslt");
                  myXslTransform.Transform(myXPathDocument, null, writer);

      Collapse Expand XML Nodes/Elements

        
      Hi everyone.  I have very minor question but kind of hoping someone knows of a solution.  So when you query an XML data type column, you'll usually get a sort of blue colored link that when clicked, will open the XML in a new window that's in a more readable and formatted version.  I'm basically just looking to see if there's a keyboard shortcut (or hotkey) to quickly collapse/expand the nodes/elements?  I can't seem to find any info on this.  Using the (+) and (-) buttons get very tedious so I'm hoping a hotkey exists for this.  I also sometimes copy XML to a new "Analysis Services XMLA Query" window that also formats the XML to be easily readable but still can't find a way to do this.  If anyone knows, I'd kindly appreciate your response.  Thanks

      Combine, minify and compress JavaScript files to load ASP.NET pages faster

        
      Websites are getting more interactive these days and most of this interactivity comes from JavaScript. People are using different JavaScript libraries and frameworks to make their websites more interactive and user friendly.

      DataTable - Load from IDataReader - CreateDataReader - ReadXml WriteXml - Free ADO.NET Tutorials

        
      The DataTable in ADO.NET 2.0 has been seriously beefed up and I absolutely love it. Not everything we consume deals with multiple resultsets and requires the ever popular DataSet. With the cool new features in the ADO.NET 2.0 DataTable, we can get many of the cool features in the DataSet without all the extra baggage and memory footprint particular to multiple resultsets.

      Load DataTable from IDataReader

      ActiveSync 4.5 (Free Down Load) using in Windows Mobile Pocket Pc

        
      Microsoft ActiveSync 4.5 is the latest sync software release for Windows Mobile-powered devices. ActiveSync provides a great synchronization experience with Windows®-powered PCs and Microsoft Outlook right out of the box.

      Features:

      * Faster file transfer speed and photo sync via Outlook are only available for Windows Mobile 5.0 powered devices.
      * Remote PC Sync (via WiFi or LAN) has been removed due to Enterprise customer feedback around security issues.
      * Customers using Microsoft Exchange 2003 Service Pack 2 with devices running the Messaging and Security Feature Pack for Windows Mobile 5.0 will benefit from the following feature enhancements included in ActiveSync 4.5: Direct Push Technology, local device wipe, and certificate powered authentication to Microsoft Exchange.
      * Microsoft® Outlook® 2000 is not supported by ActiveSync 4.5. It is highly recommended that users upgrade to Microsoft® Outlook® 2003 messaging and collaboration client.
      * Conversion of database files for use on a mobile device is not supported by ActiveSync 4.5. On previous versions, this feature was limited to devices running Windows Mobile software for Pocket PC 2003 and earlier.
      * Conversion of font files for use on a mobile device is not supported by ActiveSync 4.5. On previous versions, this feature was limited to devices running Windows Mobile software for Pocket P

      website load testing

        

      How can i check "load testing" on my site (its using vb.net and SQL server)? Any free tool available or can it be done through windows server IIS?




      Open ModalPopup dialog on page load

        

      Is there a way to make a modal popup panel active on page load so that the user can't do anything until they deal with the popup dialog?


      JQuery Treeview plugin is not working with Ajax page load in ie8

        

      Hi there,

      I developed a page where i m using jquery treeview plugin to generate tree. It worked fine on FF, IE8 with out ajax.

      But when my page loads thro' ajax call in IE8, it is not collapsing or expanding tree.


      Any idea?

      Thanks in advance.



      Is this load full or matching one only... coz of need to know performance

        

      Hi..

      This my Two Table i have one doubt...

      For my first table i have select Top 2 from Employee_info 

      and second table itz just selct * from MDEp..

      What my doubt is on loading the above report?

      Is this load all the record from MDep or just matching one based on Employee_info..?


      huge number of data from database ... so how to minimize load time

        


      Hi ...

      I have used the above method to configure my crystal report ...

      Its working fine , But i have huge number of data in database ....

      So , it take long time to load the report ...

      So , i have decided to show only the last 50 records inserted into the database , not all the 500 records to be loaded every time.

      Plz help me with this issue  ...

       

      Also , Plz explain me abt index legend in crystal report.


      Site map with > 150 nodes

        

      Based on the turotial, it mention that if my sitemap have more than 150 node it will have impact on the performance.

      Is the any option if i do have more than 150 mode to include in the xml file (with security node trimming=true, where i inserted role=ABC in every node.)


      Line Break Problem in XSLT

        

      Hi All,

      I want to add line break in the xslt but it not working.

      Below is the code for adding the line break.

      </P> <P>
      &lt;xsl:variable name="Collection7"&gt;</P> <P>&nbsp; &lt;xsl:value-of select="$13932"/&gt;&lt;xsl:text&gt;&amp;#xa;&lt;/xsl:text&gt;</P> <P>&nbsp; &lt;xsl:value-of select="$31042"/&gt;&lt;xsl:text&gt;&amp;#xa;&lt;/xsl:text&gt;</P> <P>&lt;/xsl:variable&gt;</P> <P>&lt;td&gt;&lt;xsl:value-of select="$Collection7"/&gt;&lt;/td&gt; </P> <P>&lt;/code]</P> <P>I have tried the below code as well:</P> <P>&lt;xsl:variable name="newline"&gt;
      &lt;xsl:text&gt;
      &lt;/xsl:text&gt;
      &lt;/xsl:variable&gt;</P> <P>or</P> <P>&lt;xsl:variable name="break"&gt;&amp;lt;br&amp;gt;&lt;/xsl:variable&gt;</P> <P>or </P> <P>addign &lt;br/&gt;</P> <P>then also it not adding the line break.</P> <P>But If I write code like below then it is adding the line break and it works fine.</P> <P>

      Could not load file or assembly - Web Deployment Project

        

      Hi,

      I have the following projects in a solution :

      - A Web Application

      - A Class Library

      - A Web Deployment project

      The Web Application compiles and run fine when I don't go through the Web Deployment Project. However when I try to use that, I get the following error:

      Error 1 An error occurred creating the configuration section handler for hibernate-configuration: Could not load file or assembly 'NHibernate' or one of its dependencies. The system cannot find the file specified. (F:\Folke\Folke.csproj_deploy\Release\web.config line 4) 1 1 Folke.csproj_deploy

      "An error occurred creating the configuration section handler for hibernate-configuration: Could not load file or assembly 'NHibernate' or one of its dependencies. The system cannot find the file specified. (F:\Folke\Folke.csproj_deploy\Release\web.config line 4)"

      This is the beginning of my Web.config:

      <?

      May i use the collapse and expand feature (like tree menu) in Report ?

        

      HI all,

      May i use the collapse and expand feature (like tree menu) at Report iam using the Report viewer  Control for displaying the Report on my Asp.net Page .

       

      I have number records and each record have detail as i clicked or expand the record then details will be shown is it possible with report viewer control 
       
      If any one have experince before please share the ideas.

       

      Best Regards


      Load Report Failed

        

      Hi All,

      I created a simple crystal report using visual studio 2008 (GAC INSTALLED VERSION 10.5.3700.0) . It is working fine locally. When I deploy it to the server when I click on the report I am seeing the empty report with  "LOAD REPORT FAILED" Text. How can I resolve this Issue?

      I checked the GAC and made sure that Both are using the same version of Crystal reports . Can some one help me how to resolve this issue?


      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?


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