Tuesday, February 15, 2011

This view cannot be displayed because the number of lookup and workflow status columns it contains exceeds the threshold (8) enforced by the administr

This limitation is not a limitation, but a setting done by SharePoiunt and you can altere it using Central Administrator site! So, go to Central Administration and then browse to:

1) Application Management > Manage Web Application.
2) In the Web Application list, select the web application you need.
3) Then go to General Settings > Resource Throttling.
4) In the Resource Throttling window, scroll down to List View Lookup Threshold and change the value to the number that suits your needs.

This will affect the Performance so please make sure you change it as you required...

Thursday, May 28, 2009

Reverse String in C#

public class clsTest
{

//Creating function to reverse the String
public string StrRev( string str )
{
char[] charArr = str.ToCharArray();
Array.Reverse( charArr );
return new string( charArr );
}

//Calling the Function

protected void Page_Load(object sender, EventArg e)
{
Response.Write(StrRev("This is a test"));
}

}


//Output
tset a si sihT

Wednesday, April 1, 2009

What is the use of Lock statement in .Net?

What is the use of Lock statement in .Net?
You can use the lock statement for handling critical situation or conditions in your code.

The lock keyword marks a statement block as a critical section by obtaining the mutual-exclusion lock for a given object, executing a statement, and then releasing the lock

Example for Lock statement

lock(this)
{

for(int i = 0; i < 10; i++)
{
//Do your work
}

}

What is the use of serializable? Give Example

What is the use of serializable? Give Example
Marking a class with the key word [Serializable] at the top ensures that the object can be serialized in an XML format primarily for data exchange between disparate systems.
Example
[Serializable]
public class clsClass
{
public clsClass()
{

}
}