43 строки
1.4 KiB
Plaintext
43 строки
1.4 KiB
Plaintext
@section MetaTags{
|
|
<meta name="description" content="This example demonstrates about restricting access to file or folder in a ASP.NET MVC File Explorer." >
|
|
}
|
|
|
|
@section SampleHeading{ <span class="sampleName">FileExplorer-Access Control-ASP.NET MVC-SYNCFUSION</span>}
|
|
|
|
@section ControlsSection{
|
|
@(Html.EJ().FileExplorer("fileExplorer").Layout(LayoutType.Tile).Path("~/FileContent/")
|
|
.AjaxAction(@Url.Content("FileAccessDefault")).Width("100%").IsResponsive(true).MinWidth("150px"))
|
|
}
|
|
@section PropertiesSection{
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
Signed in
|
|
</div>
|
|
<div class="col-md-3">
|
|
@using (Html.BeginForm("AccessControl", "FileExplorer", FormMethod.Post, new { id = "form1" }))
|
|
{
|
|
@(Html.EJ().DropDownList("selectRole").TargetID("roleList").Width("120px")
|
|
.ClientSideEvents(e => e.Change("onChange")).Value(ViewBag.Role))
|
|
<div id="roleList">
|
|
<ul>
|
|
<li>Administrator</li>
|
|
<li>Document Manager</li>
|
|
<li>Default User</li>
|
|
</ul>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
@section ScriptSection{
|
|
<script>
|
|
$(function () {
|
|
$("#sampleProperties").ejPropertiesPanel();
|
|
});
|
|
function onChange(args) {
|
|
$('#form1').submit();
|
|
}
|
|
</script>
|
|
}
|
|
|