如何在asp.net中的urdu字符串上应用子字符串?我已经尝试过将substring方法描述为英语,但它不起作用。给出错误
>'/ Ahp'应用程序中的服务器错误。重定向URI不能包含 换行符。描述:发生了未处理的异常 在执行当前Web请求期间。请查看 堆栈跟踪以获取有关错误及其位置的更多信息 起源于代码。异常详细信息:System.ArgumentException:重定向URI不能 包含换行符。
来源错误:
第175行:private void showError(string msg)第176行:{Line 177:Response.Redirect(“Error.aspx?error =”+ msg);第178行:
第179行:源文件:c:\ WorkSpace \ Ahp \ Default.aspx.cs行:177
堆栈追踪:
[ArgumentException:重定向URI不能包含换行符。]
System.Web.HttpResponse.Redirect(String url,Boolean endResponse, Boolean permanent)+8892485 System.Web.HttpResponse.Redirect(String url)+8 _Default.showError(String msg)in c:\ WorkSpace \ Ahp \ Default.aspx.cs:177 _Default.loadTopRatedNews()in c:\ WorkSpace \ Ahp \ Default.aspx.cs:170 _Default.Page_Load(Object 发件人,EventArgs e)在c:\ WorkSpace \ Ahp \ Default.aspx.cs:34
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,Object o,对象t,EventArgs e)+14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)+35 System.Web.UI.Control.OnLoad(EventArgs e)+91
System.Web.UI.Control.LoadRecursive()+74
System.Web.UI.Page.ProcessRequestMain(布尔 includeStagesBeforeAsyncPoint,Boolean
includeStagesAfterAsyncPoint)+2207
我将错误信息重定向到错误页面
//--------------------- Its the code ------------------------------------
desc.Text = reader.GetValue(1).ToString().Substring(0,30);
//--------------- Main Error ---------------------------------------------------
Index and length must refer to a location within the string. Parameter name: length
//====================== Count checked of each ==================================
More then 540 character in each