ExtensionsToHTMLHidden Method (Object, String) | |
Gives HTML code for hidden data
Namespace:
SOWIWeb.Helper
Assembly:
SOWIWeb.Helper (in SOWIWeb.Helper.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax public static string ToHTMLHidden(
this Object pData,
string pName = ""
)
<ExtensionAttribute>
Public Shared Function ToHTMLHidden (
pData As Object,
Optional pName As String = ""
) As String
Parameters
- pData
- Type: SystemObject
Value to be hidden
Note |
---|
Data type boolean puts text true or false
|
- pName (Optional)
- Type: SystemString
Value for HTML attribute Name and ID
Return Value
Type:
String
HTML code syntax
<input type ="hidden" name ="[pName]" id ="[pName.GetMVCFieldIdentification()]" value ="[pData]" />";
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Object. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Examples
Example use in a CSHTML code file
@Html.Raw(Model.ID.ToHTMLHidden("ID"))
See Also