Regex Optimization

Recently we encountered a huge performance issue in our HttpModule or Url Rewriter module. After a lot of tense and investigation, the issue is locked down at the way of using Regular Expression. In the HttpModule, we are using Regex to match certain... [More]

Tags:

Create Cross-Domain Cookie?

Recently I've been challenged to create cookies under other domain which I do not have access to. I was poking around the internet and trying to find a solution for this. The most popular solution is using javascript/html + iframe, which sounds like ... [More]

Tags:

.Net Tech | .Net Tech

Include javascript to a customized component as web resource

This post describes how to include javascript file and other files as webresource to a customized webcontrol. [More]

Tags:

.Net Tech

Work with RESTful service using LINQ to XML

Recently I've been working on a project that uses third party RESTful service a lot. The main response format of the service is XML, I found it is a big headache to parse the data using XmlDocument, so wondering if it can be easily done by using LINQ... [More]

Silverlight interactive with database

Silverlight interactive with database or server objects. [More]

Tags: ,

.Net Tech

RadComboBox AutoComplete Hightlight Keyword?

RadComboBox is a good control to use for auto-suggestion/type-head/auto-complete, the only thing is when using webservice to get the item, the client template is pre-defined and can not be customized. However, we do find hightlighting the keyword in ... [More]

Tags: , , , ,

.Net Tech

Batch Job in a webpage?

By looking at the title, some people will simply say "Uhhh..why you want to do batch jobs in a web page?". However, sometimes you may need to do that due to environment limitation or whatever reason. The question becomes how we handle the request tim... [More]

Tags: ,

.Net Tech

Get Client Geo Location in C#

There are two things to do in order to get the Geo location of a request client. 1,  Get the IP address of the request using below code... string strClientIP = Request.ServerVariables["REMOTE_ADDR"].Trim(); 2, Get the country code by calling ... [More]

Tags: ,

.Net Tech

Cache a page conditonally

Cache is one of the ways to improve site performance, one most used caching policy is page level cache. In .NET, we will use below directive in the page to cache the whole page(10 minutes as example). <%@ OutputCache VaryByParam="none" Duration=... [More]

Tags: , ,

.Net Tech

Stop crawler spamming

It is great when search engines frequently visit your site and index your content at most of the times. But sometimes these crawlers are really bad and may break your site down by sending thousands of request every second. Is there anyway we can work... [More]

Tags: , , , , , , ,

SEO