Compilation Error in file: \BlogEngine.Web\search.aspx.cs

Topics: ASP.NET 2.0, Controls
Feb 23, 2008 at 8:51 PM
I'm a newbie to BlogEngine.NET.
I just knew BlogEngine.NET. I downloaded the source code Version 1.3 and complied it, but not successful with
below error related to line 183 in file\BlogEngine.Web\search.aspx.cs:
Unexpected character ?

Below is related code in above file:

Server Error in '/' Application.


--------------------------------------------------------------------------------
Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1010: Newline in constant

Source Error:

Line 183: text = StripHtml(content);
Line 184: if (text.Length > 200)
Line 185: text = text.Substring(0, 200) + " ?;
Line 186: text = "? + text.Trim() + "?;
Line 187: }


Source File: \web\search.aspx.cs Line: 185

What the hell is the problem? Did anyone faced this prob?
Thanks and best regards,

Feb 23, 2008 at 9:02 PM
Edited Feb 24, 2008 at 2:19 PM
I have modified the source code, and now it is working well.


text = text.Substring(0, 200) + "?";
text = "?" + text.Trim() + "?";


Thanks,


http://www.vehicleworld.cn/post.aspx?id=e3c75c50-f64b-44cf-8c29-d222663809c6