Click or drag to resize

FormsExtensionsOnFormsToPath Field

Event for SOWI Web Foundation Forms Extensions ToPath(Forms)

Namespace:  SOWIWeb.Foundation
Assembly:  SOWIWeb.Foundation (in SOWIWeb.Foundation.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax
public static EventHandler<EventArgsViewEnum<Forms>> OnFormsToPath

Field Value

Type: EventHandlerEventArgsViewEnumForms
Examples
This example puts a costum view path

Adds event handler for a custom view path setting

//* add event handler for a custom view path setting *
SOWIWeb.Foundation.FormsExtensions.OnFormsToPath += this.FormsToPath;
Event handler puts custom view path
/// <summary>
/// Custom Form default view path
/// </summary>
/// <param name="sender">null object because it's static declaration</param>
/// <param name="e">Has view name and view path</param>
private void FormsToPath(object sender, SOWIWeb.Foundation.EventArgsViewEnum<SOWIWeb.Foundation.Forms> e)
{
    switch (e.View)
    {
        case Forms.none:
            break;
        case Forms.CreateContent:
            break;
        case Forms.DeleteContent:
            break;
        case Forms.DetailsContent:
            break;
        case Forms.EditContent:
            break;
        case Forms.FileChoice:
            break;
        case Forms.Form:
            break;
        case Forms.IndexContent:
            break;
        case Forms.IndexContentDataTables:
            break;
        case Forms.Layout:
            e.Path = "~/Views/Test/Layout";
            break;
        case Forms.ListHeader:
            break;
        case Forms.Navigation:
            break;
        default:
            break;
    }
}
See Also