Friday, March 20, 2009

First Look – Microsoft Silverlight 3

Wednesday, March 11, 2009

WCF Tutorial

WCF concepts include ABC i.e.,
  • A - Address
  • B - Binding
  • C – Contract
Services are building on windows communication foundation’s System.ServiceModel assembly in location
C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation.
You can find some sample applications in some of my articles. Samples consist of a WCF service and a silverlight client that consumes the service. You'll get a basic concept of WCF from those samples.
Download Sample Application,
You'll get more samples from MSDN, Download Samples
MSDN Tutorials for WCF,

How to: Define a Windows Communication Foundation Service Contract
How to: Implement a Windows Communication Foundation Service Contract
How to: Host and Run a Basic Windows Communication Foundation Service
How to: Create a Windows Communication Foundation Client
How to: Configure a Basic Windows Communication Foundation Client
How to: Use a Windows Communication Foundation Client

Tuesday, March 10, 2009

Remove Binding in WPF code-behind

We can remove binding from a dependency property of a dependency object from code behind using,

BindingOperations.ClearBinding(sliderRange, Slider.ValueProperty);
In this snippet, we are removing binding from Value Property of Slider sliderRange.

Monday, March 2, 2009

Tag Mapping in ASP.NET

Tag mapping is using for mapping two controls of compatible type so that it'll map to the mapped control.Suppose we are creating a custom panel having some custom functionality like,

public class CustomPanel : Panel
//Code here//
Now we can map all panels to our custom panel so that normal panel will get functionality of custom panel.In web.config,

<clear />
<add tagType="System.Web.UI.WebControls.Panel"

Sunday, March 1, 2009

Image & Sound in Validator Controls

I am going to give code snippets for a very interesting,to display image or sound instead of validation message in ASP.NET Validation controls.

Displaying image

<asp:requiredfieldvalidator id="reqPercentage" runat="server" errormessage='<img src="image.gif">' controltovalidate="txtPercentage">

for displaying image instead of text we are giving an img tag with src set to a image in our when validation is failed it'll show image instead of text.

Sound in Validation Control

<asp:requiredfieldvalidator id="reqPercentage" runat="server"
bgsound src="sound.wav"
>' controltovalidate="txtPercentage">

And also disable client side script for textbox.Run the application yo'll see the change.