TechSapphire Thursday, 2024-04-25, 7:24 PM
Site menu
Login form
News
Play Games
  • Deep Freeze
  • Ice Slide
  • Gyroball
  • Fat Fish
  • Bush Royal Rampage
  • Main » 2012 » November » 02

    XSLT is very simple but powerful way to handle dynamic transform. In this example i have used XML datasource and XSLT file for generating dynamic nested menu. The menu source is an SQL server database. The script for generating SQL table is also provided with solution.

    Download source code of dynamic nested menu using XSLT
    Category: Programming | Views: 26645 | Added by: Admin | Date: 2012-11-02 | Comments (1)

    Create Excel (xls) from gridview, XSLT from XML using c#, ASP.NET or .NET

    In this example i have covered 2 ways of generating XLS:

    1. From Gridview
    2. Using XLST file

    Code for Gridview to XLS:

    Download code for Gridview to Excel


    Code for XLS using XSLT:

    Download code for generating excel using XSLT

    Note:
    • Better way is using XSLT.
    • XSLT is fast resource for generating XSL
    • Can be used with any datasource taking XML in between.

    Category: Programming | Views: 7550 | Added by: Admin | Date: 2012-11-02 | Comments (0)

    Generating HTML from XML, Database, Dataset

    HTML from XML file source is generated, but you can use dataset to generate HTML from database by generating XML using dataset. In this example i have used XSLT file to transform XML to HTML file.

    Download source code

    Code:
            string source = Server.MapPath("~") + "//XMLFile.xml";
            string style = Server.MapPath("~") + "//XSLTFile.xslt";
            string destination = Server.MapPath("~") + "//a.html";
            XslTransform transfor=new XslTransform();
            transfor.Load(style);
            transfor.Transform(source,destination);

    XSLT:

    <xsl:stylesheet version="1.0" xmlns:xsl="htt ... Read more »
    Category: Programming | Views: 13489 | Added by: Admin | Date: 2012-11-02 | Comments (2)

    Read html, text or content between HTML tag c#. .NET

    It is very easy to read content between HTML tag using c#. Steps for reading HTML content are as follows:

    • Using namespace System.Xml
    • Code:

            XmlDocument a=new XmlDocument();
            a.Load(Server.MapPath("~") + "//a.html");
            XmlNode n = a.SelectSingleNode("/html/body");
            TextBox1.Text = n.InnerXml;

           Note:

    • Be sure about case sensitivity of tag example (/HTML/BODY) in place of (/html/body).

    Download source

    Category: Programming | Views: 2679 | Added by: Admin | Date: 2012-11-02 | Comments (0)

    Categories
    Programming [27]
    Tips for programming
    Security [2]
    Security Tips
    Google [1]
    Use google faster then ever you use
    Project [14]
    HTML [2]
    Electronics [0]
    Data Structure [0]
    Database [16]
    SQL SERVER
    SSRS [1]
    Sql Server Reporting Services
    Copyright MyCorp © 2024