1 Replies - 4914 Views - Last Post: 08 January 2013 - 09:00 AM Rate Topic: -----

#1 Luke24  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 07-January 13

Hidden controls (Permissions)

Posted 07 January 2013 - 06:38 AM

Quite new to ASP MVC. I got three buttons on a page and three Booleans in my database

<input type="submit" value="Add File" />
<input type="submit" value="Add Software" />
<input type="submit" value="Add Hardware" />

Booleans

AddFileVisible
AddSoftwareVisible
AddHardwareVisible

How can I make these buttons only appear depending on if there set to true in the db?

using Entity Framework

Is This A Good Question/Topic? 0
  • +

Replies To: Hidden controls (Permissions)

#2 Nakor  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 441
  • View blog
  • Posts: 1,488
  • Joined: 28-April 09

Re: Hidden controls (Permissions)

Posted 08 January 2013 - 09:00 AM

if you're passing those values to the view then you could just do a simple if/else check in the view to determine whether to display the button or not
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1