How to hide generated javascript file in visual studio code

In this post I am going to show you a cool trick in visual studio code. Let's suppose you are writing typescript code in visual studio code and you want to hide generated javascript code.

Create .vscode folder in your folder and then create settings.json file and paste following code

{ "files.exclude": { "node_modules":true, "**/.git": true, "**/.DS_Store": true, "**/*.js.map": true, "**/*.js": {"when": "$(basename).ts"}     } }

How To Load xml string into DataSet

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
   <title>Untitled Page</title>
</head>
<body>
   <form id="form1" runat="server">
       <div>
           <asp:GridView ID="GridView1" runat="server">
           </asp:GridView>
       </div>
   </form>
</body>
</html>
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Default3 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string xmldata = "<DocumentElement>" +
             "<OutLier>" +
             "<Name>1</Name>" +
             "<DOB>19800101</DOB>" +
             "<State>GG</State>" +
             " <ID>12345</ID> " +
             " <SIG>Y</SIG> " +
             "</OutLier>" +
              "<OutLier>" +
             "<Name>2</Name>" +
             "<DOB>19800101</DOB>" +
             "<State>GG</State>" +
              " <ID>1325</ID> " +
             " <SIG>Y</SIG> " +
             "</OutLier>" +
             "</DocumentElement>";

        try
        {
            DataSet ds = new DataSet();
            System.IO.StringReader sr = new System.IO.StringReader(xmldata);
            ds.ReadXml(sr);
            GridView1.DataSource = ds;
            GridView1.DataBind();

        }
        catch (ArgumentNullException ex)
        {
            ex.Message.ToString();
        }

    }
}

Comments

  1. Hey very nice tutorial.
    One more good tutorial is here..

    http://a1ashiish-csharp.blogspot.com/2012/10/cnet-how-to-load-and-display-xml-data.html

    ReplyDelete

Post a Comment

Popular posts from this blog

How to get cell value of gridview using JQUERY

how to convert web page to pdf

Export Html to Pdf using iTextSharp(GridView)