Skip to main content

WebDictionary.DictionaryPath Property

Specifies a path to the dictionary file used to create spellchecker dictionaries.

Namespace: DevExpress.Web.ASPxSpellChecker

Assembly: DevExpress.Web.ASPxSpellChecker.v24.2.dll

Declaration

[DefaultValue("")]
public virtual string DictionaryPath { get; set; }

Property Value

Type Default Description
String String.Empty

A String value that specifies the path to the dictionary file.

Remarks

The DictionaryPath property specifies the dictionary file’s location in relative path.

We recommend that you store required dictionary files in a local server’s folder because a network folder or a remote drive can be unavailable for a server where a web application is published. You can copy the files from your network folder to a local folder while loading the corresponding partial view:

public ActionResult RichEditPartial()
{
    if(System.IO.File.Exists("c://Users//Public//Documents//DevExpress Demos 19.2//Components//ASP.NET//CS//MVCxRichEditDemos//App_Data//Dictionaries//en_US.aff")) {
        System.IO.File.Copy("c://Users//Public//Documents//DevExpress Demos 19.2//Components//ASP.NET//CS//MVCxRichEditDemos//App_Data//Dictionaries//en_US.aff", Server.MapPath("~/App_Data/Dictionaries/en_US.aff"));
    }
    if(System.IO.File.Exists("c://Users//Public//Documents//DevExpress Demos 19.2//Components//ASP.NET//CS//MVCxRichEditDemos//App_Data//Dictionaries//en_US.dic")) {
        System.IO.File.Copy("c://Users//Public//Documents//DevExpress Demos 19.2//Components//ASP.NET//CS//MVCxRichEditDemos//App_Data//Dictionaries//en_US.dic", Server.MapPath("~/App_Data/Dictionaries/en_US.dic"));
    }
    return PartialView("_RichEditPartial");
}
settings.Settings.SpellChecker.Dictionaries.Add(new DevExpress.Web.ASPxSpellChecker.ASPxSpellCheckerOpenOfficeDictionary() {
    GrammarPath = "~/App_Data/Dictionaries/en_US.aff",
    DictionaryPath = "~/App_Data/Dictionaries/en_US.dic",
    Culture = new System.Globalization.CultureInfo("en-us"),
    CacheKey = "enDic"
});

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DictionaryPath property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also