Settings
Create custom setting and use that setting at anywhere.
Create Setting
Goto settings page from manage panel. Create and use infinity settings at code behind(C# or .cshtml)
Create setting page
There are 5 type of data types
-
String
Define and use string setting value
-
Number
Define and use number setting value
-
Boolean
Define and use boolen setting value
-
Date
Define and use date setting value
-
Picture
Upload a picture and use that picture at code behiend(c# or .cshtml)
// Get the defined string
@Setting("MyCustomSetting").Value
// Get the defined picture
@Setting("MyCustomSetting").PictureUrl
// Get the defined boolean
@Setting("MyCustomSetting").BoolValue
// Get the defined number
@Setting("MyCustomSetting").NumberValue
// Get the defined date
@Setting("MyCustomSetting").DateValue
Using defined picture on code behind
<img src="@Setting("mycustom.setting").PictureUrl" />