SYSK 330: How To Use An Embedded Resource From A Sub-Folder

If you’re creating a custom client-side control by deriving from System.Web.UI.IScriptControl, you may want to embed the .js files into your assembly instead of having to deploy them to every web site that uses those controls (this is especially valuable if you’re developing a control library).  All you need to do is to: Click on…

5

SYSK 327: The Cost of RoundedCornersExtender From AjaxControlToolkit

More and more web sites are using rounded corners on spans (labels) and panels.  And since AjaxControlToolkit makes it sinfully easy to do, before I start using it extensively, I decided to do some profiling to see the cost of that extender.   Here is what I found:   1.     HMTL (download) size in bytes:…

4

SYSK 326: How to Measure AJAX Control Initialization Time on the Client Side

Say, you’ve added a few extender controls to make your AJAX-enabled web site look very ecstatically appealing to the end users.  And now you’d like to evaluate the cost of beautifying your site in such manner.  Measuring the additional page size bytes is pretty straight forward, so is the page load time… But how would…

1

SYSK 325: How To Tell Which UpdatePanel Issued a Page PostBack

If you have multiple UpdatePanel controls on a page, and your Page_Load has a lot of data retrieval and rendering logic, you may want to know exactly which UpdatePanel is being updated, and execute only relevant code segments to optimize performance.   Here is a code snippet that should give you the UpdatePanel control id…

5

SYSK 313: Search Engine Ranking Rules

If you’re interested in how search engines rank web pages, read these four articles: ·         “SSW Rules to Better Google Rankings” –http://www.ssw.com.au/SSW/Standards/Rules/RulesToBetterGoogleRankings.aspx ·          “How URLs Can Affect Top Search Engine Rankings” by John Heard, Technical Analyst at Planet Ocean Communications — http://www.marketposition.com/blog/archives/2006/04/how_urls_can_af.html ·         “How Search Engines Rank Web Pages” by Danny Sullivan — http://searchenginewatch.com/showPage.html?page=2167961 ·        …

0

SYSK 310: The Difference Between setInterval and setTimeout

In JavaScript, you have two options to execute a specific function in the future, i.e. after a specified time interval: window.setInterval and window.setTimeout   Both functions have similar signatures, e.g.:   var timeout = window.setTimeout(“javascript statement”, milliseconds) var intervalId = window.setInterval(“code”, milliseconds[, “lang”])   As you can see, the first difference is that the setInterval…

0

SYSK 309: How To Cancel a Web Service Request

AJAX makes asynchronous invocation of web service methods very easy.  For example, the line below instantiates a web service proxy (MyService) and calls a method (MethodX):   var request = new MyService().MethodX(param1, param2, OnRequestComplete, OnError);   The question is: if you needed to cancel this request (e.g. it’s a resource intensive request and the user…

1

SYSK 305: What is a MITM attack?

MITM stands for man-in-the-middle…  A MITM attack is where an attacker is able to read, insert and modify messages between two parties without either party knowing that the link between them has been compromised.   For following picture from http://www.arcot.com/mitm/index.html demonstrates the concept:     Some may think that using secure HTTP (https) eliminates the…

3

SYSK 304: How to detect and handle form-based authentication timeout during ASP.NET script callback

First thing first – if you’re not familiar with ASP.NET script callbacks, make sure to check out http://msdn2.microsoft.com/en-us/library/ms178208.aspx.   Now, what happens if the authentication token times out right before the client makes an asynchronous call to the server?    Will your error callback function be invoked? Unfortunately, the answer is ‘no’. Will your success…

0