| Next Tip?
Home » Archive

Articles Archive for October 2009

LINQ »

[13 Oct 2009 | No Comment | 525 views]

A Lambda expression is nothing but an Anonymous Function, can contain expressions and statements. Lambda expressions can be used mostly to create delegates or expression tree types. Lambda expression uses lambda operator => and read as ‘goes to’ operator.
Left side of this operator specifies the input parameters and contains the expression or statement block at the right side.
Example: myExp = myExp/10;
Now, let see how we can assign the above to a delegate and create an expression tree:
delegate int myDel(int intMyNum);
static void Main(string[] args)
{
//assign lambda expression to a delegate:
myDel myDelegate = …

WCF »

[12 Oct 2009 | No Comment | 347 views]

DataContract is belongs to Class.
ServiceContract is belongs to Interface
OperationContract is belongs to Method
Tweet This Post

Crystal Report »

[12 Oct 2009 | No Comment | 636 views]

Close() Vs Dispose Method
The basic difference between Close() and Dispose() is, when a Close() method is called, any managed resource can be temporarily closed and can be opened once again. It means that, with the same object the resource can be reopened or used. Where as Dispose() method permanently removes any resource ((un)managed) from memory for cleanup and the resource no longer exists for any further processing.
Example showing difference between Close() and Dispose() Method:
[Code]
using System;
using System.Data;
using System.Data.SqlClient;
public class Test
{
private string connString = “Data Source=COMP3;Initial Catalog=Northwind;User Id=sa;Password=pass”;
private SqlConnection connection;
public Test()
{
connection = …

Asp.Net, HTML »

[12 Oct 2009 | No Comment | 475 views]

<object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ id=”name” width=”468″ codebase=”http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0″ height=”60″>
<param value=”http://www.msdotnetheaven.com/shubhhostingDiwali.swf” name=”movie”/>
<param value=”high” name=”quality”/>
<param value=”transparent” name=”wmode”/>
<embed
pluginspage=”http://www.macromedia.com/shockwave/download/index.cgi?
P1_Prod_Version=ShockwaveFlash” quality=”high” type=”application/x-shockwave-flash” height=”60″ src=”http://www.msdotnetheaven.com/shubhhostingDiwali.swf” width=”468″ wmode=”transparent” name=”name”>
</embed>
</object>
Tweet This Post

Asp.Net »

[12 Oct 2009 | No Comment | 1,188 views]

By default width of column handled automatically, means columns in Gridview control are sized automaticlaly internally column cells redered as HTML cell. On the basis of requirement one can set the width dynamically also.
Following are the steps to do it;
1. Setting Column Width Dynamically:
Through code, set the width property on the ItemStyle of GridView.
Following is the code-snippet for the same:
VB.NEt:
[CODE]
Dim intColWidth As Integer = 25
GridView1.Columns(0).ItemStyle.Width = intColWidth
[/CODE]
C#:
[CODE]
int intColWidth = 25;
GridView1.Columns(0).ItemStyle.Width = intColWidth;
[/CODE]
2. Setting Column width as per Data-Content :
Write following piece of code in RowDataBound handler / event:
Note: Code is …

Get Adobe Flash playerPlugin by wpburn.com wordpress themes