Skip to main content

Posts

Showing posts from December, 2009

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

<%@ 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…