While binding a grid with more than 3000 record i am getting error like
'System.OutOfMemoryException' was thrown,
Stack
OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]
System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity) +29
System.Text.StringBuilder..ctor(String value, Int32 startIndex, Int32 length, Int32 capacity) +104
System.Data.DataSet.SerializeDataSet(SerializationInfo info, StreamingContext context, SerializationFormat remotingFormat) +856
System.Data.DataSet.GetObjectData(SerializationInfo info, StreamingContext context) +18
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +7630106
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +51
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +410
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +134
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph) +13
System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +842
[ArgumentException: Error serializing value 'System.Data.DataSet' of type 'System.Data.DataSet.']
System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +3319
System.Web.UI.ObjectStateFormatter.Serialize(Stream outputStream, Object stateGraph) +110
System.Web.UI.ObjectStateFormatter.Serialize(Object stateGraph) +57
System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Serialize(Object state) +4
System.Web.UI.Util.SerializeWithAssert(IStateFormatter formatter, Object stateGraph) +37
System.Web.UI.HiddenFieldPageStatePersister.Save() +79
System.Web.UI.Page.SavePageStateToPersistenceMedium(Object state) +105
System.Web.UI.Page.SaveAllState() +236
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1099
I needed to display one month record so its coming more than 3000,so pls help on this.Thanks in advance