Two useful string functions - substr & substring 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 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 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? 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# 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 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# 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# 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# 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# 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 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 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# A code snippet,posted on the dotnet newsgroup,about how to send email using C#.<%@Import |
How To Read And Write A Cookie 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 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 how to print the current page |
Example Of Creating Objects 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 Linking drop downs is a frequent question. Here is a javascript based example
|