Archive

Show Summaries

June 2008 - (7 posts)

027 Fri  Javascript Delayed Redirect
Time delay in url redirection may be useful for the following conditions: * Refresh a web page in every specified seconds. * For displaying an "Update you Bookmark" page when a page Url has ben changed.
027 Fri  Setting Focus Using Javascript to an Input Field / Form Field / Html Element (Textbox) when the Page Loads
The javascript code below shows how to set the focus on an element/input field (textbox) when the page is loaded.
123 Mon  Set Focus on Page Load / After Postback / After Submit in ASP.NET 2.0 and ASP.NET 3.5 - Setting Focus to an ASP.NET Control
In ASP.NET 1.x, it is not possible to programmatically set focus to a web server control without using the JavaScript's focus() function. You may find the details on how to set focus to web controls in ASP.NET 1.x in one of my previous articles: Set Focus After PostBack in ASP.NET 1.x - Setting Focus to an ASP.NET Control
023 Mon  Set Focus After PostBack / After Submit / on Page Load in ASP.NET 1.x - Setting Focus to an ASP.NET Control
Management of control focus is one of the common tasks when building web applications with effective and friendly user interface. In order to set focus on a certain control such as textboxes, buttons dropdowns after postback in ASP.NET 1.x, we can use a dynamic javascript block that facilitates Javascript’s focus() function.
621 Sat  JavaScript substring vs. substr with Examples - The Difference Between JavaScript String Extraction Functions
When you write JavaScript, you need to know string manipulation functions. There is a slight difference between JavaScript substring() and JavaScript substr() which are both used to extract characters from strings.
020 Fri  JavaScript parseFloat() Function with Examples - Converting Strings to Numbers
The JavaScript parseFloat() function, parses a string and returns the first floating point number in the string. The function determines if the first character in the string argument is a number, parses the string from left to right until it reaches the end of the number, discards any characters that occur after the end of the number, and finally returns the number as a number (not as a string).
020 Fri  Javascript parseInt() Function with Examples - Converting Strings to Integers
The JavaScript parseInt() function parses a string and returns the first integer in a string.

January 2008 - (6 posts)

231 Thu  How To: Minimize HTTP Requests – The Most Important Guideline for Improving Web Site Performance
In my previous article 7 Easy-to-Apply Tips to Improve Your Web Site Performance, I described methods to achieve better client-side performance. The conclusion of the article was: “The most important and effective way to improve web site performance is to make fewer HTTP Requests.” Since browsers only are able to download two components on parallel per hostname, and every HTTP request has an average round-trip latency of 0.2 seconds, that causes a 2 second latency alone, if the site is loading 20 items, regardless of whether they are style sheets, images or scripts. (On an average broadband connection with a browser capable of downloading two components at a time). Since browsers spend approximately 80% of the time fetching external components such as scripts, style sheets and images. Reducing the number of HTTP requests has the biggest impact on improving website performance. Moreover, it is the easiest way to make a performance improvement. This article focuses on ways of minimizing HTTP Requests to maximize web site performance.
027 Sun  Compress Javascript with compressjavascript.com - Free Online Javascript Compression Tool
Internet Applications with Web 2.0 features make heavy use of JavaScript. As rich web applications are being built with larger JavaScript, the need for JavaScript compression to keep bandwidth and page load times as small as possible by decreasing the size of the files served is becoming more important.
022 Tue  Themes for Ajax Control Toolkit's Tab Control
Matt Berseth created five themes for the AjaxControlToolkit's Tab control using the images from dynamicdrive.
119 Sat  JavaScript: Array Length Property
The length of any Javascript array can be found by using its length property. Moreover, the length property can be used to loop through array elements. Array numbering starts from 0 in Javascript. Therefore, name_of_the_array[1] is the second element of the array. As a result, the last element of the array is the total size of the array minus 1.
018 Fri  document.lastModified - How To: Display the Last Modified Date of a Document using Javascript - Javascript's document.lastModified Property
Displaying the last modified date of a web page using Javascript is just a matter of diplaying the document.lastModified property of Javascript.
118 Fri  The terminal server has exceeded the maximum number of allowed connections – Error in Remote Desktop Connection (mstsc)
Remote desktop connections remain active until the logged in user selects “Log Off” from the Start Menu. If a user closes the remote desktop window without logging off, the user will still remain logged on. Only up to two simultaneous Remote Desktop connections are allowed by default and active and disconnected sessions are calculated in this connection limit. If a third simultaneous attempt is made to login to the server “The terminal server has exceeded the maximum number of allowed connections” error will be shown to the user, and they will be unable to complete the login process. Fortunately, there is a way around this

November 2007 - (13 posts)

117 Sat  JavaScript setInterval Function - JavaScript Timing Events
JavaScript features a couple of methods that lets you run a piece of JavaScript code (javascript function) at some point in the future. These methods are: setTimeout() and setInterval(). In this tutorial, I'll explain how setInterval() method works, and give a real world example.
116 Fri  JavaScript setTimeout Function - JavaScript Timing Events
JavaScript features a couple of methods that lets you run a piece of JavaScript code (javascript function) at some point in the future. These methods are: setTimeout() and setInterval() In this tutorial, I'll explain how setTimetout() method works, and give a real world example.
316 Fri  JavaScript Url Redirect with Delay using setTimeout
Time delay in url redirection may be useful for the following conditions: Refresh a web page in every specified seconds. For displaying an "Update you Bookmark" page when a page Url has ben changed.
216 Fri  location.href vs. location.replace - The Difference Between JavaScript Url Redirection Methods
JavaScript offers several ways to display a different page in the current browser window. Redirecting visitors with Javascript is straightforward.
715 Thu  How To: Compress ViewState in ASP.NET 2.0 - ViewState Compression with System.IO.Compression
We can completely disable viewstate by setting EnableViewState to false in the page directive but you need extra programming effort for you to take care of the page state. It is a good idea to disable ViewState for the controls that do not actually need it such as Literals and Labels by setting EnableViewState to false. But this do not entirely solve the problem. ASP.NET 2.0 comes with the System.IO.Compression namespace, which contains classes with functionality to compress/decompress streams. This methods can be used to compress the viewstate.
010 Sat  JavaScript substr Function
When you write JavaScript, you need to know what string manipulation methods/functions are available.The substr() method extracts a specified number of characters in a string, from a start index.
009 Fri  JavaScript substring Function
When you write JavaScript, you need to know what string manipulation methods/functions are available. substring is used to take a part of a string.
006 Tue  How To: Prevent Form Spam without Using CAPTCHA
Web sites are increasingly under spam attack from automated scripts. “CAPTCHAs” (Completely Automated Public Turing test to tell Computers and Humans Apart) can help Web sites to distinguish between human and machine users by forming a problem that is easy for humans to solve, but difficult for machines to solve. Because CAPTCHAs rely on perception, users unable to perceive a CAPTCHA (for example, due to a disability or because it is difficult to read) will be unable to perform the task protected by a CAPTCHA. Prevent Spam Attacks without Using CAPTCHAs: The idea here is setting up a form with a text field which is made invisible by using CSS. After form submission, if that text box has information in it, that means a human didn’t fill it out (because this field is invisible for humans), and the submitted form is simply aborted.
004 Sun  JavaScript Redirect - Url Redirection with Javascript
Redirecting visitors with Javascript can be achieved by one of the methods: location.href or location.replace.
002 Fri  Enter Key Default Button in ASP.NET 2.0
If you try to use Enter key in ASP.NET, according to your browser's type, you can get really weird results. In my previous article Default Button in ASP.NET 1.1, I described two methods to make enter key default button for form inputs. ASP.NET 2.0 makes this easier by introducing a concept of "default button" that can be used with either a or control. What button will be "clicked" depends of where acutally cursor is and what button is choosen as a default button for form or a panel.
502 Fri  Enter Key Default Button in ASP.NET 1.1
Hitting the enter key in a TextBox may sometimes cause undesired effects in ASP.NET 1.1. For example, the wrong submit button's click event may be triggered or no click event of any button is triggered.
602 Fri  KeyPress, KeyDown, KeyUp - The Difference Between Javascript Key Events
In JavaScript, pressing a key triggers events which can be captured and handled. Three events are triggered when a key is pressed and released: keydown,keypress,keyup
1102 Fri  How To: Disable Form Submit on Enter Key Press
Sometimes, you need to disable form submission on Enter Key press. If you want to prevent it completely, you need to use OnKeyPress handler on tag of your page.

October 2007 - (4 posts)

021 Sun  Int32.Parse, Convert.ToInt32, Int32.TryParse - Comparing String to Integer Conversion Methods of .NET
Int32.Parse, Convert.ToInt32, Int32.TryParse - Comparing String to Integer Conversion Methods of .NET
117 Wed  Gmail's Plans on Mail Storage
Google chosed April Fool's Day to announce the launch of Gmail in 2004 to make people to believe it was a hoax as free web-base e-mail with one gigabyte of storage was imposible on those days since Hotmail was offering 2 MB and Yahoo was offering 4 MB of mail storage. Actually, this was a marketing strategy to make people thing that the product is hoax, spread the word around and then to surprise them when they realize that it is actually real. (Check: google's hoaxes) In addition, on April 1st, 2005, Google announced the increase of storage to 2 GBs. In April 2005, Google started to increase Gmail storage as part of their "Infinity+1" storage plan promising to give more space to Gmail users. They put a storage counter on Gmail. On October 12, 2007, they announced that they speeded up the counter to give more mail storage.
017 Wed  Visual Studio Tip: Stop Loosing the Clipboard Data Accidentally
I frequently type Ctrl+C instead of Ctrl+V on a blank line and loosing the data on the clipboard by copying a blank line. Today, I discovered a VS option to disable cut and copy commands on blank lines when there is no selection. You may find the option in Tools - Options - Text Editor - All Languages - General. Uncheck Apply Cut or Copy commands to blank lines when there is no selection.
205 Fri  Static Variables vs Application Object - Boost ASP.NET Web Site Performance by Using Static Variables instead of the Application Object
When developing Web applications with ASP.NET, you sometimes need to access data which is shared among users again and again throughout the life of the application. If you want to share a value or an object instance between all sessions, you typically use the Application object. However, a better alternative to Application object is a static property defined in a class. Static properties maintain their values throughout the Application. So they work like the Application object.

September 2007 - (14 posts)

220 Thu  IZWebFileManager - Advanced ASP.NET 2.0 Online File Manager Server Control
IZWebFileManager is a web based file manager server control for Microsoft IIS web servers, written for ASP.NET 2.0. It is compatible with most-used browsers like Internet Explorer, Netscape and Firefox.
217 Mon  Convert, Parse and TryParse Methods - Comparing String to Number Conversion Methods
.Net provides several different ways to extract integers from strings. In this article, I will present the differences between Parse, TryParse and ConvertTo.
012 Wed  Limiting the File Upload Size in ASP.NET
By default, the maximum size of a file to be uploaded to a server using the ASP.NET FileUpload control is 4MB. You cannot upload anything that is larger than this limit. To change this size limit, you have to make some changes in the application's web.config
612 Wed  Using JavaScript with ASP.NET
ASP.NET provides a powerful server-based programming model with its postback architecture that allows performing all the work on the server while ensuring security and compatibility. The most significant weakness of postback architecture is its overhead. It is impossible to react to mouse movements or key presses on the server efficiently. To overcome this weakness, developers use client-side JavaScript. This client-side script allows developers to react user events without posting back (submitting to the server).
012 Wed  Cross-Browser JavaScript Events - Commonly Supported Events that are Safe to Use
The combination of JavaScript and HTML is called as DHTML (Dynamic HTML). Since not all browsers support the same level of DHTML, the events you can use and the way events work vary from browser to browser. The following table contains the JavaScript events that are safe for browsers (Cross-Browser) that support JavaScript.
110 Mon  7 Easy-to-Apply Tips to Improve Your Web Site Performance
A lot of articles have been written on website performance optimization lately but I want to share my hands-on-experience and important articles on the subject. There are two types of performance: * Server Performance * Perceived Performance Server Performance is associated with the number requests that a server can handle at a time and the time needed to process these requests. On high volume websites, since it determines the number of users a machine can serve before additional server is needed, this performance aspect is very important. Perceived Performance is the speed of websites in visitors’ perspective. Even if the server performance is high, a site may appear slow to a visitor because of slow client-side performance. This article focuses perceived performance tuning by supplying reasons for poor client-side performance and details out how we can achieve better client-side performance.
007 Fri  Absolutely Pluggable Application-Wide Error Logging Facility for ASP.NET Web Applications - ELMAH
After taking a web application online, you need to track exceptions and errors effectively in order to debug problems. ELMAH (Error Logging Modules and Handlers) is an application wide error logging facility which is completely pluggable therefore it can be added to a running ASP.NET web application without any need for compilation or deployment.
006 Thu  Generate Sitemaps for Google, MSN/Live, Yahoo, Ask on the fly using an ASP.NET HttpHandler
Sitemaps are XML files for search engines to learn what pages to crawl and how frequently to check for changes on each page. Here is a brief overview of how SiteMap HttpHandler will work: A request for SiteMap, will be intercepted and passed to our SiteMap HttpHandler which will generate the SiteMap XML.
005 Wed  Accessing Local IIS Web Sites via Name using the Hosts File
Earlier, I posted a step by step guide on Creating IIS7 sites, applications, and virtual directories using Internet Information Services Manager. In the article, I created a new website named “bloggingdeveloper” and created a single HTTP binding configured to listen on all interfaces, port 81, and without a host-header restriction. The site was accessible via http://localhost:81/. In this step by step tutorial, I will describe accessing a local site via name (e.g. http://bloggingdeveloper/) using the Hosts file.
004 Tue  7 HTML Elements that Search Engines Love - Tips on Forming Search Engine Friendly Pages
The ranking algorithms of search engines are kept secret and they change often. Moreover, there is no exact formula for perfectly optimized HTML. On the other hand, some HTML tags/elements have great effect on search engine rankings.
303 Mon  HeadScriptManager - A class library for registering scripts into the page header with ASP.NET 2.0
The build in Page.ClientScript object allows you to place JavaScript inside an ASP.NET page. We cannot use this object to place JavaScript code or JavaScript include file into the head section of the page. With ASP.NET 2.0, Visual Studio 2005 automatically places the runat="server" attribute in the head tag of each page which allows us to interact with the page header. Simone B created a library, to include/register scripts and style sheets into the head portion of an ASP.NET page.
002 Sun  HTTP Error 401.3 - Unauthorized Error - While creating IIS 7.0 web site on Windows Vista
After Migrating the application to work with the Integrated .NET mode, you might come across a problem: Server Error in Application "WebSiteName" - HTTP Error 401.3 – Unauthorized
001 Sat  HTTP Error 500.0 - Internal Server Error - While creating IIS 7.0 web site on Windows Vista
You might have come across to the following “HTTP Error 500.0 - Internal Server Error” while working on Windows Vista.Follow the directions shown on the error message to resolve the problem.
201 Sat  HTTP Error 500.19 - Internal Server Error - While creating IIS 7.0 web site on Windows Vista
You might have come across to the following “HTTP Error 500.19 - Internal Server Error” while trying to create IIS 7.0 web site on Windows Vista. Actually Microsoft has tightened the security on Windows Vista and most of the time it is annoying when it asks your permission.

August 2007 - (10 posts)

131 Fri  Cross-Browser solution for correcting mysterious yellow input fields caused by Google Toolbar's AutoFill feature
I recently posted about correcting mysterious yellow input fields caused by Google Toolbar's AutoFill feature. However, today I discovered that the javascript given in the post only corrects the background color in Internet Explorer. The reason is simple: onPropertyChange event handler is not defined for other browsers.
031 Fri  Error: the current trust level does not allow use of the 'compilerOptions' attribute - When building ASP.NET website with Visual Studio 2008 Beta 2 or Visual Web Developer 2008 Express
When building ASP.NET website with Visual Studio 2008 Beta 2 or Visual Web Developer 2008 Express, a new entry in the applications web.config configuration file is inserted. This is done when the user creates a new project, or migrates an existing website to use .NET Framework 3.5.Since The compilerOptions setting is not allowed in medium trust or a partial trust, when this website runs in medium trust or any partial trust setting, ASP.NET will raise the following error “the current trust level does not allow use of the ‘compilerOptions’ attribute”.
030 Thu  ZYB - a free online backup service for mobile phone contacts, calendar events and text messages
ZYB is an easy way to store your phone’s contacts, pictures, text messages and calendar events online. ZYB also lets you connect with people you know and makes sure you always have their updated contact details on your phone. As most of your real life friends are already on your phone, ZYB gives some additional social features like photo tagging and content sharing with the people you know.
229 Wed  Extending the ASP.Net Multiline TextBox control to limit the number of characters entered
Developers use multiline TextBox controls in almost all web projects. Since MaxLength property of a TextBox control does not work when the TextMode property of TextBox is set to Multiline, we usually use Validator controls to validate the length. In this hands-on article, we are going to extend the TextBox control using JavaScript in order to limit the number of characters entered by the user to the length specified.
428 Tue  Internal Error 2739 when installing Adobe CS3 Products
When trying to install Adobe Photoshop CS3, Adobe Flash CS3, Adobe Fireworks CS3, Adobe Dreamweaver CS3, Adobe Creative Suite 3 Web Premium, Adobe Creative Suite Production Premium on Windows Vista 32-bit or Windows Vista 64-bit, you may come across the following error: Setup has encountered an error and cannot continue. Contact Adobe Customer Support for assistance. Internal Error 2739. The Internal Error 2739 problem can be solved by registering the JScript.dll and VBScript.dll modules in Windows Vista.
028 Tue  Correcting mysterious yellow input fields caused by Google Toolbar's AutoFill feature
Browsers with Google Toolbar AutoFill function enabled, display a yellow background on some of the form input elements. Some users or programmers may question if Microsoft has implemented new standards to use yellow highlighted form input elements.
227 Mon  Creating IIS7 sites, applications, and virtual directories using Internet Information Services Manager
According to Microsoft, Internet Information Services 7.0, or IIS7, is the most advanced, secure and customizable platform for developing and reliably hosting Web applications and services. With IIS7, you can create sites, applications and virtual directories to serve requests. In order to serve requests and share information with users over the Internet, an intranet, or an extranet, you need to create a set of configuration that describes how the server listens for requests, and how these requests are handled. In this article, I explain the important differences between IIS6 and IIS7 in the way sites, applications and virtual directories work and how to create and configure them in IIS7.
127 Mon  Metatags from search engine rankings perspective - Are they dead?
In 1990s, META tag content was known as a secret weapon for top search engine positions. A META tag is an HTML tag that provides information about web page’s content, such as what HTML specifications a web page follows or a description of its content. META tags do not affect how a web page is displayed in a browser in other words these tags are mostly invisible to site’s visitors, but will be seen by search engines. A number of different META tags are available that you can use to include page related information, but only two of them are important from SEO perspective: the keyword tag and the description tag. Some search engines take the Keyword and the Description tags into consideration while ranking the sites for that keyword or phrase. META tags only have a limited effect on resulting high search engine rankings. Since search engines uses META tags information in some part of their ranking formula and while displaying the search results, it’s worth adding them.
026 Sun  Fake page rank domains - Beware of page rank domain scammers
For a couple of days, I’ve gotten many emails from people trying to sell me text links on sites with high Page Ranks (PR). Having links into your site from popular sites that also have lots of links coming into them is probably the most important factor for getting good search engine listings. Page Rank system from Google is a rough measure on a scale of 0 to 10 based on the relevance & content of the page and the number & quality of the link leading to it from other sites.
325 Sat  Who else wants to build effective page titles and rank high in search engines?
The title of a page is probably the most important factor in getting high search engine rankings. Web page title what appears between and tags.
  • javascript
  • querystring
  • url parameters
  • parse querystring
  • delayed redirect
  • settimeout
  • focus
  • textbox
  • page load
  • after submit
  • set focus in asp.net 2.0/3.5
  • on page load
  • after postback
  • set control focus
  • postback
  • asp.net 1.x
  • substring
  • substr
  • javascript string methods
  • parsefloat
  • convert strings to numbers
  • parseint
  • javascript history
  • history.go
  • history.back
  • http requests
  • image maps
  • css sprites
  • external css
  • external javascript
  • compress javascript
  • javascript compression
  • ajaxcontroltoolkit
  • tab control
  • array
  • length
  • javascipt
  • lastmodified
  • mstsc
  • terminal services
  • remote desktop connections
  • null
  • undefined
  • array.join
  • string concatenation
  • setinterval
  • clearinterval
  • timing events
  • cleartimeout
  • javascript timing events
  • url redirection
  • location.href
  • location.replace
  • redirect
  • redirection
  • system.io.compression
  • viewstate compression
  • compress viewstate
  • gzipstream
  • loadpagestatefrompersistencemedium
  • savepagestatetopersistencemedium
  • form spam
  • captcha
  • prevent spam without captcha
  • url redirect
  • defaultbutton
  • enter key
  • default button
  • asp.net
  • 2.0
  • form
  • panel
  • 1.1
  • form submit
  • dopostback
  • onkeypress
  • onkeydown
  • onkeyup
  • javascript key events
  • keycode 13
  • disable enter key
  • int32.parse
  • convert.toint32
  • int32.tryparse
  • google
  • hoax
  • gmail
  • storage
  • counter
  • mail
  • visual studio 2005
  • vs 2008
  • copy
  • paste
  • clipboard data
  • static variables
  • application object
  • static property
  • server control
  • web file manager
  • iz web file manager
  • convert
  • parse
  • tryparse
  • file upload control
  • maxrequestlength
  • executiontimeout
  • httpruntime
  • asp.net 2.0
  • registering scripts
  • registerclientscript
  • registerstartupscript
  • cross-browser
  • events
  • improve web site performance
  • compression
  • caching
  • elmah
  • error logging
  • exception
  • error
  • httphandler
  • google sitemap generator
  • sitemap
  • internet information services
  • iis7
  • hosts file
  • localhost
  • windows vista
  • search engine optimization
  • seo
  • search engine friendly pages
  • headscriptmanager
  • class library
  • head
  • css
  • c#
  • iis
  • internet information services manager
  • 401.3 unauthorized
  • 500.0 internal server error
  • http error 500.19
  • google toolbar
  • yellow input fields
  • input
  • select
  • background color
  • mozilla firefox
  • medium trust
  • orcas
  • compileroptions
  • warninglevel
  • zyb
  • mobile phones
  • online backup service
  • online services
  • textarea
  • maxlength
  • limit input length
  • custom server control
  • internal error 2739
  • adobe cs3
  • adobe customer support
  • solution
  • error code 0x80004005
  • 500.19 internal server error
  • meta tags
  • keywords meta tag
  • meta
  • description meta tag
  • fake page rank domains
  • scammers
  • google page rank technology
  • ebay
  • general
  • title
  • page rank