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, "**/*": true, "**/*.js": {"when": "$(basename).ts"}     } }

Cancelling an Asynchronous Request

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="">
<head runat="server">
<title>Untitled Page</title>
<form id="form1" runat="server">
<asp:ScriptManager ID="S1" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<%= System.DateTime.Now.ToLongTimeString() %>
<asp:Button ID="btnRefresh" runat="server" Text="Update"
OnClick="btnRefresh_Click" />

<script type="text/javascript">
var prm = null;

function Init(sender)
prm = Sys.WebForms.PageRequestManager.getInstance();
//Ensure EnablePartialRendering isn't false which will prevent
//accessing an instance of the PageRequestManager
if (prm)
if (!prm.get_isInAsyncPostBack())
function InitRequest(sender,args)

if (prm.get_isInAsyncPostBack() & args.get_postBackElement().id == 'btnRefresh') {
//Could abort current request by using: prm.abortPostBack();
//Cancel most recent request so that previous request will complete
//and display
alert("A request is currently being processed. Please " +
"wait before refreshing again.");


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 AjaxCancel : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)

protected void btnRefresh_Click(object sender, EventArgs e)


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)