Reputation: 1172
I'm new in C# ASP .Net. I've a problem like this:
I've data from database like this:
button_id | button_access
-------------------------
btnSearch | true
btnClear | true
btnAdd | false
btnSave | false
in my view:
@data [data from database]
...
@foreach (chk in data) {
<input name="btnSearch" type="checkbox" value="@chk.button_id" {???} />
}
...
I think, in {???}
I have to insert a condition like:
IF (chk.buttonAccess) {
//Code to write attribute checked
}
What should I filled in {???}
..?
Upvotes: 0
Views: 213