Twitter Updates

    follow me on Twitter

    Thursday, October 04, 2007

    An ASP.NET Spell Checker for a Textbox

    http://www.codeproject.com/useritems/checkspelling.asp CP article is the .net version of my 2004 asp artcile; the author has converted my asp code to asp.net and also have given due credits ;)

    Background


    Here is what he has to say,

    I did quite a bit of searching on the web and found many controls that would do this but unfortunately, these were quite expensive (especially for a South African). Still others used Google API's that seem to have been removed or Microsoft Word API's that are more suited for windows applications and not web applications.

    I then found a gem here on the Code Project by Vasantha Mohan (http://www.codeproject.com/asp/spell_check.asp) that described how to use a dictionary file to check spelling in asp. This was able to provide a good base for me to convert to ASP.NET and make some changes more suited for my project. I did not use his method to insert hard-returns as I am simply checking the text, not the formatting. In addition, I added an enhancement whereby the user can manually type an alternative word if no suitable suggestion was found by the spell checker and modified the code so that the function only searches for alternatives beginning with the same letter as the word being checked - speeding things up significantly.

    No comments: