Click or drag to resize

HTMLPanelToggle Method (String, String, String, Boolean, String, String, String, String, String, String)

Gives HTML code for a panel (toggel panel) formatted by Bootstrap

Namespace:  SOWIWeb.Helper
Assembly:  SOWIWeb.Helper (in SOWIWeb.Helper.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax
public static string PanelToggle(
	string pPanelName,
	string pPanelTitle,
	string pPanelContent,
	bool pExpanded,
	string pParentName = "",
	string pHeadingID = "",
	string pStylePanel = "panel panel-default",
	string pStyleHeading = "panel-heading",
	string pStyleTitle = "panel-title",
	string pStyleContent = "panel-body"
)

Parameters

pPanelName
Type: SystemString
panel name
pPanelTitle
Type: SystemString
panel title
pPanelContent
Type: SystemString
panel content text or HTML partial to string
pExpanded
Type: SystemBoolean
panel expanded true or false
pParentName (Optional)
Type: SystemString
when use a panel group/list then set this name/id (use for accordion panel list)
pHeadingID (Optional)
Type: SystemString
heading ID if this parameter empty then set automatically panel name and HeadingID
pStylePanel (Optional)
Type: SystemString
default StylePanel
pStyleHeading (Optional)
Type: SystemString
default StylePanelHeading
pStyleTitle (Optional)
Type: SystemString
default StylePanelTitle
pStyleContent (Optional)
Type: SystemString
default StylePanelContent

Return Value

Type: String

[Missing <returns> documentation for "M:SOWIWeb.Helper.HTML.PanelToggle(System.String,System.String,System.String,System.Boolean,System.String,System.String,System.String,System.String,System.String,System.String)"]

Examples
Example in cshtml code file. First example with text. Secound example with a HTML partial file.
// with text
@Html.Raw(SOWIWeb.Helper.HTML.PanelToggle("TESTText", "Test Text", "Panel test content text", true))

// with HTML partial to string
@Html.Raw(SOWIWeb.Helper.HTML.PanelToggle("TESTContent", "Test Content", Html.Partial("_ObjektContentObjekt").ToString(), true))

This example as HTML code result from test case of Panel formatted by Bootstrap

<div class="panel panel-default">
    <div id="TestPanelHeadingID" class="panel-heading" role="tab">
        <h4 class="panel-title">
        <a aria-controls="TestPanel" aria-expanded="true" data-toggle="collapse" href="#TestPanel" role="button">
        Panel Titel - Test</a></h4>
    </div>
    <div id="TestPanel" aria-labelledby="TestPanelHeadingID" class="panel-collapse collapse in" role="tabpanel">
        <div class="panel-body">Test SOWI Web Helper HTML Panel Toggle on 22.04.2017 12:02:25</div>
    </div>
</div>
See Also