<div id="cn"></div>
<ejs-button id="primarybtn" content="Click" isPrimary="true" onclick="clickAjax()"></ejs-button>
<script>
function clickAjax() {
var ajax = new ej.base.Ajax('/home/about', 'GET', true);
ajax.send().then(function (result) {
$('#cn').append(result);
});;
}
</script> |
@{
for (var i = 0; i <= 10; i++)
{
var ID = Guid.NewGuid().ToString();
<div>
<h6>Essential JS 2 Datepicker component</h6>
<ejs-datepicker id="@("date" + ID.Substring(0,5))" placeholder="Choose a Date"></ejs-datepicker>
</div>
}
<br />
} |
<div id="cn">
@Html.Partial("about")
</div>
<div id="dynamic"></div>
<ejs-button id="primarybtn" content="Click" isPrimary="true" onclick="clickAjax()"></ejs-button>
<script>
function clickAjax() {
var ajax = new ej.base.Ajax('/home/about', 'GET', true);
ajax.send().then(function (result) {
$('#dynamic').append(result);
});;
}
</script> |
@{
IDictionary<string, object> htmlAttr = new Dictionary<string, object>();
htmlAttr.Add("name", string.Format("{0}_{1}_{2}", "ItemDetails_", Guid.NewGuid().ToString(), "_MyTime"));
}
<h6>Essential JS 2 TextBox component</h6>
<ejs-timepicker id="time" htmlAttributes="htmlAttr"></ejs-timepicker> |
@{
for (var i = 0; i <= 5; i++)
{
var Date_ID = Guid.NewGuid().ToString();
<div>
<h6>Essential JS 2 Datepicker component</h6>
<input type="text" id="@("ItemDetails_" + Date_ID.Substring(0,5) + "__MyDate")" />
</div>
<script>
var datepicker = new ej.calendars.DatePicker();
datepicker.appendTo("#@("ItemDetails_" + Date_ID.Substring(0,5) + "__MyDate")");
</script>
}
<br />
} |