The Following Function will help to get plain text from the FCKEditor in almost any browser. // below is the protyping for trim string. function trimString (str) { str = this != window? this : str; return str.replace(/^\s+/g, '').replace(/\s+$/g, ''); } String.prototype.trim = trimString; //following function will return plain text function GetPlainText(FCKEditorID) { var FEditor = FCKeditorAPI.GetInstance(FCKEditorID); var Result = ""; if (FEditor.EditorDocument.body.textContent || FEditor.EditorDocument.body.textContent=="" ) { //Firefox compitable browser Result = FEditor.EditorDocument.body.textContent.trim(); } else { //IE compitable browser Result = FEditor.EditorDocument.body.innerText.trim(); } return Result; }
LINQ BASIC I am starting from this mail to show the technical skills to work with LINQ . The following is a very basic LINQ Query Expression Example: string[] strCities = { "Mumbai", "Delhi", "Surat", "Chennai", "Ahemdabad", "Jaipur" }; IEnumerable strResult = from city in strCities select city.ToUpper(); grdLinqBasic.DataSource = strResult; grdLinqBasic.DataBind(); In the above Example I am using the array of string and then using LINQ query expression against the array. I am also applying a string operation in the query itself, which help us to modify the result in the query itself. LINQ queries return results of type: IEnumerable Where is determined by the object type of the “select” clause of the query. In the above sample “city” is string. So the above example have the IEnumerable type is “string”. LINQ is STORNGLY-TYPED It means we can have compile-time c...
Comments