AppDev: Something You Should Know by Irena Kennedy

Everything that is related to application development, and other cool stuff...

Browse by Tags

Tagged Content List
  • Blog Post: SYSK 389: How to set ClientCredentials via Configuration file in Client

    I’m working on a project where a service hosted elsewhere requires Windows authentication. As a consultant, my computer is not on the customer’s domain, so, using my logged-on Windows credentials won’t do any good. And, doing nothing results in the following exception : “The caller...
  • Blog Post: SYSK 380: How to Get Rid of Double Scroll Bar in Microsoft Report Viewer Control

    Special thanks to David Petersen who has submitted this post! If you ASP.NET page that contains the Report Viewer Control, has double scroll bars, you can remove them by including two separate form elements on the page: 1. First <form> element Includes your Headers and so forth ...
  • Blog Post: SYSK 373: How to Impersonate the Original Caller When Calling the WCF Service in ASP.NET by Configuration Only

    If your WCF services use role based authorization, and you need to pass the identity of the end user (original caller), you have a few options: 1. Use <identity impersonate=”true” /> in web.config This is not my preference since there is quite a bit of overhead with doing security context...
  • Blog Post: SYSK 364: AJAX Extensions 1.0 Source Code and Debug Symbols

    Did you know that AJAX Extensions source code and debugging symbols are available to everybody at http://www.microsoft.com/downloads/details.aspx?FamilyID=ef2c1acc-051a-4fe6-ad72-f3bed8623b43&DisplayLang=en ?
  • Blog Post: SYSK 354: How To Determine If The Page_Load Event Is Triggered by a Standard Page Postback or by the UpdatePanel?

    Ok, so you’re in a Page_Load code block, and the this.Page.IsPostBack returns true . How do you know if the request is due to a “standard” page postback or as a result of an UpdatePanel triggered postback resulting in a partial page update? The answer is simple: when the postback is caused by a...
  • Blog Post: SYSK 339: Menus and Other Popups Without Any JavaScript

    The other day I came across the following article by Eric Meyer -- http://meyerweb.com/eric/css/edge/popups/demo.html . Basically, instead of using JavaScript, you use CSS to change an element style that results in some other element(s) appearing (e.g. submenu when user hovers over the top menu...
  • Blog Post: SYSK 337: JavaScript – Should You Define Functions Inside a Prototype or Outside?

    Yesterday’s post described three ways to extend an existing type. It occurred to me that there is one more, slightly different mechanism, for defining a prototype function… you can think of it as Method 2-b. Consider the following: function TestClass(param1) { this ._param1 = param1;...
  • Blog Post: SYSK 336: Three Ways to Extend a Existing JavaScript Type

    Since I haven’t seen a clear and a relatively concise explanation on this topic, I decided to create this blog post… If you want to add a function (i.e. extend) to an existing type, there are three ways that I know of to accomplish this. For example, take the existing String object which comes...
  • Blog Post: SYSK 332: How To Register Custom Controls Once For All Web Pages

    Did you know that since .NET 2.0 you can define register directives in the <pages> element in your configuration instead of using @Register directive on every page? It’s especially useful if you’re using a custom control(s) in multiple web pages. Here is an example of registering controls from...
  • Blog Post: SYSK 331: How To Expose A Client-Side Event From Your ASP.NET Control

    Consider the following scenario – you create your own calendar control and you’d like to raise an event when a date is selected (e.g. OnDateClicked)… and you’d like for the users of your calendar control to process the event using JavaScript on the client (or think of any other scenario of when a custom...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: SYSK 302: Code Sample for Bringing Detailed Data Row into View and “Blinking” To Get User’s Attention

    Visualize this: you have a scrollable window with lots of data in a table or list format (say, a year worth of data) and you have another control that gives a 1000-foot level view of data (e.g. a yearly calendar control that uses color to indicate whether there is detailed data available for a given...
  • Blog Post: SYSK 297: Condense JavaScript Code for Faster Download

    Did you notice that Microsoft AJAX library JavaScript files come packaged as release and debug files; e.g. MicrosoftAjax.js and MicrosoftAjax.debug, MicrosoftAjaxWebForms.js and MicrosoftAjaxWebForms.debug.js, etc? One of the differences is that the release version of the file has no extra spaces...
  • Blog Post: SYSK 290: ASP.NET AJAX -- $get vs. $find

    Microsoft ASP.NET AJAX comes with a new method for getting a reference to an object representing an element on the page, e.g. input control, button, etc. -- $get . However, you might notice that there is another function that appears to do same thing – $find … So, what’s the difference between...
  • Blog Post: SYSK 286: What Does a Web Service Proxy Look Like on a Client Side?

    AJAX.NET makes it extremely simple to call a web service from a client using JavaScript… But if you’re having problems, it helps to understand what your web service proxy looks like… For example, if you have the following web service: using System; using System.Web; using System.Collections;...
  • Blog Post: SYSK 285: Is JavaScript an Object Oriented Programming Language?

    First, let’s agree on a definition of object oriented programming. It is generally agreed that “software objects” share two characteristics: they all have state and behavior (similar to real-life objects). Behavior is implemented through methods (a.k.a. functions) and the state is stored in fields...
  • Blog Post: SYSK 283: Use Caution When Using ‘Short’ Data Type in Enumerated Types

    Consider the following innocent looking code: [System.Runtime.Serialization. DataContract ] public enum TestEnum : short { [System.Runtime.Serialization. EnumMember ] Undefined = 0, [System.Runtime.Serialization. EnumMember ] TestType1 = 1, [System.Runtime.Serialization. EnumMember...
Page 1 of 2 (45 items) 12