Server Error in '/' Application.

Index and length must refer to a location within the string.
Parameter name: length

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length

Source Error:


Line 182:                                                <h3 class="equal-box-description"><%#Eval("title") %> </h3>
Line 183:                                                <p>
Line 184:                                                    <%# Bind1(Eval("description").ToString().Length>40 ? Eval("description").ToString().Substring(0,300)+"" : Eval("description").ToString() ) %><br />
Line 185:                                                     <span id="dots<%#Eval("id") %>"></span><span class="abc" id="more<%#Eval("id") %>">
Line 186:                                                        <%#Eval("description").ToString().Substring(301) %></span>

Source File: c:\inetpub\vhosts\archfoundation.in\httpdocs\ilearn.aspx    Line: 184

Stack Trace:


[ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length]
   System.String.Substring(Int32 startIndex, Int32 length) +14599300
   ASP.ilearn_aspx.__DataBind__control5(Object sender, EventArgs e) in c:\inetpub\vhosts\archfoundation.in\httpdocs\ilearn.aspx:184
   System.Web.UI.Control.OnDataBinding(EventArgs e) +100
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +178
   System.Web.UI.Control.DataBindChildren() +248
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +195
   System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +174
   System.Web.UI.WebControls.Repeater.AddDataItemsIntoItemsArray(IEnumerable dataSource, Boolean useDataSource) +291
   System.Web.UI.WebControls.Repeater.PostGetDataAction(IEnumerable dataSource) +109
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +81
   ilearn.Bindswitching() in c:\inetpub\vhosts\archfoundation.in\httpdocs\ilearn.aspx.cs:34
   ilearn.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\archfoundation.in\httpdocs\ilearn.aspx.cs:16
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0