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 302:
Line 303:                                            <div class="card">
Line 304:                                                <a href="<%#"../../../../humrang/"+Eval("ID","{0}")+"/"+Eval("posttitle","{0}").Substring(0,10).Replace("&","").Replace(" ","_").Replace("#","_").Replace(",","_").Replace("/","").Replace("'","").Replace(".","").Replace("?","").Replace(":","").Replace("!","").Replace("*","").Replace("(","").Replace(")","").Replace("$","").Replace("@","").Replace("~","").Replace("`","").Replace("{","").Replace("}","").Replace("[","").Replace("]","").Replace("|","").Replace(";","")%>" class="text-muted post-link">
Line 305:                                                    <img class="card-img-top" src="<%#Eval("bannerimage") %>" alt="<%#Eval("posttitle")%>">
Line 306:                                                    <div class="card-body">

Source File: e:\hostingspaces\jeet1991\humrang.com\wwwroot\humrang\post\category\subcategory\Default.aspx    Line: 304

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.humrang_post_category_subcategory_default_aspx.__DataBind__control77(Object sender, EventArgs e) in e:\hostingspaces\jeet1991\humrang.com\wwwroot\humrang\post\category\subcategory\Default.aspx:304
   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
   post_category_subcategory_Default.loadPagePostBySubcategory(Int32 pageIndex) in e:\hostingspaces\jeet1991\humrang.com\wwwroot\humrang\post\category\subcategory\Default.aspx.cs:140
   post_category_subcategory_Default.Page_Load(Object sender, EventArgs e) in e:\hostingspaces\jeet1991\humrang.com\wwwroot\humrang\post\category\subcategory\Default.aspx.cs:44
   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