Posts

Showing posts from February, 2006

GreatNews Feed Reader

GreatNews is a free feed (RSS/Atom) reader that can work off portable drives and supports syncing with Bloglines.com , full page reading (newspaper style, Sage (Firefox feed reader) style, and others), labeling and news watches. Tags: Web Developer Blog , Feed Reader , RSS , Atom

iTextSharp: Generate a PDF file containing a table (ASP.NET/C#)

Contining on from iTextSharp: Generating a Basic PDF file (ASP.NET/C#) , here is a demo of how to generate a PDF document with a table in it. TablePDF.ashx <%@ WebHandler Language="C#" Class="MyNamespace.TablePDF" %> using System; using System.IO; using System.Web; using iTextSharp.text; using iTextSharp.text.pdf; namespace MyNamespace { public class TablePDF: IHttpHandler { public bool IsReusable { get { return true; } } /// <summary> /// Font used for table headers /// </summary> private Font TableHeaderFont { get { return new Font(Font.HELVETICA, Font.DEFAULTSIZE, Font.BOLD); } } public void ProcessRequest(HttpContext ctx) { // make sure it is sent as a PDF ctx.Response.ContentType="application/pdf"; // make sure it is downloaded rather than viewed in the browser window ctx.Response.AddHeader("Content-disposition", "attachment; filename=TablePDF.pd

Yahoo! User Interface Library and Design Pattern Library

Yahoo! User Interface Library is a JavaScript library (under the open source BSD license) that can be used to make a site more interactive. It is comprised of 'Core Utilities' and 'UI Controls'. Core Utilities Animation Connection Manager (XMLHttpRequest / AJAX) DOM (manipulating the elements (style, coordinates) in a loaded web page) Drag and Drop Event (adding them to existing elements on a page) UI Controls Calendar Slider TreeView Yahoo! Design Pattern Library is a set of solutions to common problems (breadcrumbs, autocomplete, drag/drop, pagination etc). There is no code, but it does demonstrate the solutions Yahoo uses for its sites. They also have a blog about it: Yahoo! User Interface Blog . Tags: Web Developer Blog , Yahoo , JavaScript , AJAX , XMLHttpRequest

Add .NET Framework Folder to PATH via batch file (update)

Add .NET Framework Folder to PATH via batch file has been updated. This is a batch file that adds the .NET framework directory (i.e. where the command line compilers csc , vbc etc are in) to the PATH system variable. It does not add the path if it is already set, so it is of most use to those that have not done it manually (the SDK doesn't add the directory on install). Tags: Web Developer Blog , DotNet

How to generate an iCalendar file (ASP.NET/C#)

It is fairly simple to generate an iCalendar file (for calendar clients like Microsoft Outlook or Mozilla Sunbird ) as it is just a plain text file with the extension 'ics'. A WebHandler is the best method of doing this. Update (10 Feb 2006) : Now works in Sunbird. When prompted to open / save the file, choose to download. Then in Sunbird, go to File > Import and browse for the saved file. iCalendar.ashx <%@ WebHandler Language="C#" Class="MyNamespace.iCalendar" %> using System; using System.Web; namespace MyNamespace { public class iCalendar: IHttpHandler { public bool IsReusable { get { return true; } } string DateFormat { get { return "yyyyMMddTHHmmssZ"; // 20060215T092000Z } } public void ProcessRequest(HttpContext ctx) { DateTime startDate = DateTime.Now.AddDays(5); DateTime endDate = startDate.AddMinutes(35); string organizer = "foo@bar.com"; string

iTextSharp: Generating a Basic PDF file (ASP.NET/C#)

iTextSharp is free library for .NET that allows you to create PDF documents. It can be used to dynamically create PDF's which can be streamed to the user. As there is no HTML being sent to the user, a WebHandler (ashx file) is a more appropriate way to generate your PDF than an aspx page. Download itextsharp-3.0.10-dll.zip (latest version as of 08 Feb 2006) and save the dll in the archive to your websites bin directory. Here is a basic sample of creating a PDF (more complex samples may follow in future posts). BasicPDF.ashx <%@ WebHandler Language="C#" Class="MyNamespace.BasicPDF" %> using System; using System.IO; using System.Web; using iTextSharp.text; using iTextSharp.text.pdf; namespace MyNamespace { public class BasicPDF: IHttpHandler { public bool IsReusable { get { return true; } } /// <summary> /// Font used for any hyperlinks added to the PDF /// </summary> private Font LinkFont { get

Alternatives to innerHTML

Alternatives to innerHTML (slayeroffice article) gives many examples of working with the DOM and modifying a document without resorting to innerHTML. The problem with innerHTML is that it could cause issues with strict XHTML documents (served with the correct mime type, application/xhtml+xml) and also can result in illegible code (may be hard to decipher another developers code). Tags: Web Developer Blog , JavaScript , innerHTML

Clean Word Html Update

Clean Word Html has been updated with a few bug fixes. Tags: Web Developer Blog