عرض المشاركات من يناير, ٢٠٠٨
In this blog post, I will show how to get the value of keycode using a simple javascript code. Apart from this, I will also provide the list of keycode mapping < html > < head > < meta http-equiv = &quo…
In this blog post, I will show you how to trigger button click events from javascript. To understand The problem let’s create a simple page and put the following logic inside. The code is self-explanatory. function TrigBu…
This article will show you how to copy text to the clipboard without using any third-party library. < html > < head > < script > function copyToClipboar ( ) { /* Get the textare…
In this article, I will show you a simple trick for converting ArrayList to DataSet or DataTable so that I can filter or make a select distinct from it or Bind it to Gridview. public DataSet ConvertArrayListToDataSet ( …
You need to get the HTML returned from a web server in order to examine it for items of interest. For example, you could examine the returned HTML for links to other pages or for headlines from a news site. using System ; usi…
You have a string representation of a host (such as www.google.com ), and you need to obtain the IP address from this hostname. using System ; using System . Collections . Generic ; using System . Text ; using System…
Your application needs to know if a drive (HDD, CD drive, DVD drive, etc.) is available and ready to be written to and/or read from. Additionally, it would be nice to know if you have enough available free space on the drive to …
This article will see how we can populate a DropDownList control with an XML file as a source. Our XML file looks something like below, which simply contains the name of the clients. <?xml version="1.0" encoding=&q…
How to construct an image generator used to create a visual security code that helps prevent automated sign-ups in your web applications. The text generated is stored in Session to be used for comparison to the user’s input. …
< %@ Page Language = " C# " AutoEventWireup = " true " CodeFile = " ValidateCheckBoxList.aspx.cs " Inherits = " ValidateCheckBoxList " % > <!DOCTYPE html PUBLIC "-/…
To block an IP address from your web application we used a HttpModule that could be reused in any ASP.NET application. When an IP address is blocked it stops the response and sends a “403 Forbidden” header. Even though it’s a…
It would help if you could compress the data you write to a file using one of the stream-based classes. In addition, you need a way to decompress the data from this compressed file when you read it back in. Use the System.IO…
Have you ever wondered what is actually encoded in the __VIEWSTATE hidden variable on your WebForms? It’s actually a base64 serialized encoding of a datatype called a Triplet, that has other objects nested within it. I threw …