HOME Delphi HTML Javascript C# Cookie Print C# Print SMTP getElementById C# CGI Sample C# CGI Example CGI C# CGI array MailMessage kbdevent HttpCookie Print Dialog SmtpMail GetEnvironmentVariable QUERY_STRING Substring TPrintDialog PDF Creation Key event Keyboard Event C# DLL Call Linking Drop down C# DLL MoveNext new Object PDF CallBack PDF Generation PdfWriter Peek Pop BinarySearch Print Setting Print Text Files Algorithm DLL Import Drop down Dropdown EnableRaisingEvent Enqueue FIFO FileStream FileSystemEventArgs FileSystemEventHandler FileSystemWatcher CallBackMethod GetEnumerator Dequeue GetFieldByName Create PDF Hash Hashtable ContainsValue

SUBSTRING.ZIP

Two useful string functions - substr & substring   (created at Jan 15, 2008)   58  

Now a days, javascript is widely used for web 2.0 programming.In this case both function is very useful for string related algorithm.You can simple get the required part of the string with high performance provided by client PC's performance.1) substr() me...

A Customizable Printing Text Class   (created at Aug 27, 2007)   40  

At least once,in the life of a programmer,it succeeds that the moment arrives to print a text document. The task is quite simple for a .NET programmer,but even more with PrintTextDocument class. This class was written to help in printing text documents,add...

Simple C# CGI working on Apache   (created at Aug 27, 2007)   38  

Simple program to demonstarte the power of c# on the Net. This program require web server e.g(java web server ,apache etc).Hello.csclass zzz{  public static void Main()  {    System.Console.WriteLine("Content-Type:text/html ");  &n...

How to send binary data through C# CGI app?   (created at Aug 27, 2007)   66  

Following example implemented binary data downloading.using System;using System.Collections.Generic;using System.Text;using System.IO;namespace cscgi{  class CsCGI  {    private static string dbgString = "id=1234&pic=123.gif";  &nb...

Interacting With TinyPic From C#   (created at Aug 26, 2007)   40  

The following snippet will demonstrate how to interact with http://tinypic.com,an image mirroring service,directly from a C# application,using the WebRobot component available from http://foxtrot-xray.com/web-robot/void uploadTinyPic(string imagetags,strin...

Creating A Watched Folder With Assigned Events   (created at Aug 26, 2007)   50  

Create a new project and add a form to it. Put a button on the form called button1 then add this code.using System.IO;private void button1_Click(object sender, System.EventArgs e){                FileSystemWatcher ob...

Calling Your Main Thread From A Worker Thread In C#   (created at Aug 26, 2007)   115  

There are many cases where it is necessary to let your main application know that a thread has completed. Your main application could spawn some threads to do background work and then when the threads have completed their work they could return the results...

HashTable Tutorial In C#   (created at Aug 26, 2007)   47  

Adding objects to a Hashtable is just like adding to a collection since they both inherit from the same parent.Hashtable h = new Hashtable();h.Add("Key1", "Value1");h.Add("Key2", "Value2");h.Add("Key3", "Value3");h.Add("Key4", "Value4");h.Add("Key5", "Valu...

Stack Tutorial In C#   (created at Aug 26, 2007)   63  

stack is a LIFO (Last In First Out) queue, so if you add two items and then ask for an item you would get the second item then the first item. To add items to the Stack you use Push method. This method takes an object of any type but to keep things simple ...

Queue Tutorial In C#   (created at Aug 26, 2007)   37  

Adding Items to the QueueTo add items to the Queue you use Enqueue method. This method takes an object of any type but to keep things simple lets just give it a string object: Queue q = new Queue();q.Enqueue("So");q.Enqueue("This");q.Enqueue("Is");q.Enqueu...

Create PDF Files On the Fly In C Sharp   (created at Aug 26, 2007)   56  

Creation of PDF Document in 5 easy stepsStep 1: First create an instance of document objectDocument myDocument= new Document(PageSize.A4.Rotate());Step 2: Now create a writer that listens to this doucment and writes the document to desired Stream.PdfWriter...

How to call Visual C/C++ implemented DLL functions in C# - Simple DLLImport   (created at Aug 26, 2007)   75  

Managed world is beautiful, I have all classes I want in FrameWork.. But what if I want call some unmanaged code? For instance, I have DLL written in C++, and want use it from C#. Let's look some code. Our DLL exports some function, in CDecl convention, th...

Send Email Using C#   (created at Aug 26, 2007)   118  

A code snippet,posted on the dotnet newsgroup,about how to send email using C#.<%@Import namespace="System.Web.Util"%>try{MailMessage MyMail = new MailMessage();MyMail.To = "who";MyMail.From = "you";MyMail.BodyFormat = MailFormat.Html;MyM...

How To Read And Write A Cookie   (created at Aug 26, 2007)   41  

A post on aspngbeta about readingwriting a cookie in C#//To setHttpCookie cookie;String UserID = "foo";cookie = new HttpCookie("UserID");cookie.Values.Add("UserID",UserID);Response.Cookies.Add(cookie);//To readHttpCookie cookie;cookie = Request.Cookies["Us...

Using C# With Cookies   (created at Aug 26, 2007)   79  

A code snippet posted on aspcs about accessing and writing cookies using C#./* Read shopper id from client cookie */public static bool GetCurrentShopperId(ref string id,System.Web.HttpRequest request){try{HttpCookie cookie = request.Cookies["iparts_pa"];if...

Printing A Page   (created at Aug 26, 2007)   66  

how to print the current page

Example Of Creating Objects   (created at Aug 26, 2007)   76  

an example of creating object in javascript,taken from http://www.wdvl.com/Authoring/JavaScript/Tutorial/objects.htmldirect instance of an objectDespite the awkward sound name, a "direct instance of an object" simply means creating a new single object, suc...

Linking Drop Downs   (created at Aug 26, 2007)   100  

Linking drop downs is a frequent question. Here is a javascript based example