Yearly Archives: 2011
Moving data between a pair of Repeaters using JQuery
The following example demonstrates how to move multiple records from one repeater to another, back-&-forth.It’s totally client-side, using JQuery.Here’s the application in action, with few screen shots & the complete source code. <%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”PairOfRepeaterMoveData.aspx.cs” Inherits=”PairOfRepeaterMoveData” %> <!DOCTYPE … Continue reading
Invoking multiple WCF service asynchronously and in parallel, from an aspx page.
Invoking web service or any I/O activity which is time/resource intensive, can get lot of help from asynchronous processing, simply because the request thread invokes all registered async tasks & goes back to the thread pool & is free to … Continue reading
Easy example on working with "UserControl and Event/Delegate"
The example below contains 3 UserControls and it highlights the way these 3 user-controls sends information across, using custom event. All the event and their respective event-handlers are defined in separate class files. UserControl1 contains a Dropdownlist.UserControl2 contains a textBox … Continue reading
Print GridView selected record(s) using JQuery and Context help.
The following example demonstrates, another way to print, selected records in a GridView, using jquery.It also uses the JQuery plugin from “abeautifulsite.net”, to print a single GridView row , using “mouse right click”. Here’s the complete code sample. <%@ Page … Continue reading
Few random development Tips-N-Tricks-2
Two interesting things about DataTable — (1) DataTable.Expression and (2) DataTable.LoadDataRowThe first one I use, — to add a new Column to a DataTable, which will be populated with an already existing column’s value, when the column gets created. Here’s … Continue reading
Handling Custom Event generated in UserControl, inside ‘Base Page class’
It’s always a good practice to derive all the aspx pages from a ‘base page class’. Another reason, as how this helps in controlling the visibility at control-level, application-wide. In this example below, I have an aspx page derived from … Continue reading
Auto Refresh GridView using SqlCacheDependency and Toolkit’s Timer.
SqlCacheDependency basically can send a notification to the web application, whenever any change occurs to the underlying data source.You may learn more about ‘SqlCacheDependency’ here — http://msdn.microsoft.com/en-us/library/system.web.caching.sqlcachedependency.aspxIn this example below, a GridView & Timer control is inside an UpdatePanel. The … Continue reading
Creating Portable UserControls (dll) in VS2010
The following example shows how to combine any number of UserControls into a dll & re-use across applications. Step1: Creating a UserControlVS2010 –> File –> New Web Site –> ASP.NET Empty Web Site. I chose the Empty Web Site template … Continue reading
Multiple UserControl instances in a page and JQuery
If any UserControl contains javascript/client code and we have multiple instances of that usercontrol in a given aspx page, there often arises a conflict in retreiving control with correct ids in the client script. JQuery selectors actually lets us select … Continue reading