Thursday 10 January 2013

User role base Div style in MVC

User role base Div Style  

If the user was editor,then i was assigned account type an edit was true

Now use this code


<div class="contactedNameStyle" style='display:@(Model.AccountType == MakeMeChangeMyJob.Models.AccountType.User && Model.Type == MakeMeChangeMyJob.Models.ModelType.Edit ? "block" : "none")'>
                @Html.LabelFor(m => m.AllowAllRecruiters)
                @Html.RadioButtonFor(m => m.AllowAllRecruiters, true, new { @selected = true })
                @MakeMeChangeMyJob.Strings.AllowAllRecruiters
                <br />
                @Html.RadioButtonFor(m => m.AllowAllRecruiters, false) @MakeMeChangeMyJob.Strings.SpecifyPreferences
</div>


for that account type is witch type of user and model type of now what process running (Add,Edit,Update). in our application

No comments:

Post a Comment

If any doubt?then please comment in my post

How to reduce angular CLI build time

 Index: ----- I am using angular cli - 7 and I am going to tell how to reduce the build time as per my knowledge. Problem: -------- Now the ...