Applying Web To Your Business

RadCompression for ViewState

I'll show you how you can quickly enable ViewState compression and show you the effects it has on overall ViewState size and server performance.

How do I enable Viewstate compression?

Enabling ViewState compression with the RadCompression module really couldn't be easier. It requires no changes to your code, no changes to your markup, and not even a change to your web.config (assuming you've already added the required HttpModule references). The only thing you need to do is add a new Browser file to your web project (or modify your Browser file if you're already using one). To add a new Browser file, follow these simple steps: More...

A lot of times in development scenarios you come to a situation where you want to do a postback on a webpage when a user hits the enter button.

If you are using RadAjaxManager on that page, then to submit the page for postback or invoke a button click event handler, use the following code: More...

The current article is taken from

In some scenarios it is useful to encode and decode the URI. For example:

To avoid unexpected requests to the server, you should call encodeURIComponent on any user-entered parameters that will be passed as part of a URI. For example, a user could type "Thyme &time=again" for a variable comment. Not using encodeURIComponent on this variable will give comment=Thyme%20&time=again. Note that the ampersand and the equal sign mark a new key and value pair. So instead of having a POST comment key equal to "Thyme &time=again", you have two POST keys, one equal to "Thyme " and another (time) equal to again. More...

Add New Link Row in GridView

This example is useful when you need to add new row in the gridview. Here  to can add the link URL runtime.

Add a placeholder in the HTML page. More...

Lets suppose you have a data source in XML like:

        <add key="SomeKey" value="SomeValue">
        <add key="SomeKey" value="SomeValue">

Now you want to edit the key and values with in the xml element collection.

<asp:XmlDataSource ID="configXmlDataSource" XPath="//add" 
    runat="server" DataFile="~/settings.config"/> 

Use the following code in the code-behind

// In this code we are getting the Data Item values 
// of the Rad Editor. On UpdateCommand Event we are getting 
// the values of data row in an instance of hash.   
GridDataItem dataItem = (GridDataItem)e.Item;    
Hashtable ht = new Hashtable();    

// Get the node values as per the selected key name:    
XmlNode AppNode = XmlDataSource1.GetXmlDocument().SelectSingleNode
    ( String.Format("//add[@key='{0}']", key));

// Now assign the new value of the Value attribute of the 
// selected node:  
AppNode.Attributes["value"].Value = ht["value"];  

//Finally we need to update the xml source file:  

The following code library example demonstrates how to make a RadAjaxLoadingPanel expand to occupy the full page width and height.

Some important notes:

  • The RadAjaxLoadingPanel has to be Sticky (IsSticky="true") and absolutely positioned with width and height set to 100%.
  • The <body> tag needs its margin reset to zero, otherwise the loading panel will not start from the browser viewport edge.
  • The html, body and form tags need a min-height:100% style, in cas? the page content is less than the browser viewport height.
  • If the page content is more than the browser viewport height, you need to set the loading panel's height client-side with Javascript.
  • The RadAjaxLoadingPanel must be placed inside the <form> element. Otherwise it must not have relatively positioned parent elements, because they will prevent it from expanding properly.
  • If the RadAjaxLoadingPanel does not cover some relatively positioned elements on the page, then move the loading panel after those elements in the page markup and/or set some large enough z-index style to the RadAjaxLoadingPanel's CSS class.

You can scroll randomly up or down before making the AJAX request to see that the modal background covers the whole page and the background image is always centered in the current visible portion of the loading panel. This is achieved by the RequestStart() javascript function.

Recent Project Snapshots

  • Mary Kay - Make Over Contest
  • Utility Forms
  • Oncomed
  • Nutrition Vista
  • Forysth Barr - Letter Writer Application
  • Phase One Trials - Content Management System

About Us

studio NETSOULS is a complete IT services company, offering strategy, design, development and implementation of the total solution for your web and IT initiatives. The solutions we provide, enables businesses to leverage leading edge technology to gain sustainable competitive advantages in today's marketplace.

We specialize in designing, developing and deploying the next generation of IT solutions including e-business solutions Read more...

Month List