Posts

Showing posts from December, 2009

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 fill PDF form field using ITextSharp

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title></title></head><body><formid="form1"runat="server"><div></div><asp:ButtonID="Button1"runat="server"Text="Fill Pdf"OnClick="Button1_Click"/></form></body></html>using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using iTextSharp.text.pdf; using System.IO; publicpartialclass _Default : System.Web.UI.Page { protectedvoid Page_Load(object sender, EventArgs e) { } privatevoid fillForm…

How To Render the content of webcontrol as html

Image
<%@ Page Language="C#" ValidateRequest="false" EnableEventValidation="false" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title></title></head><body><formid="form1"runat="server"><div><table><tr><td><asp:GridViewID="grdDemo"runat="server"></asp:GridView></td><td><asp:DropDownListID="ddlDemo"runat="server"><asp:ListItemText="Cat1"Value="1"></asp:ListItem><asp:ListItemText="Cat1"Value="1"></asp:ListItem><asp:ListItemText="Cat1"Value="1&q…