Tag Info

Hot answers tagged

4

It is a subjective issue. On every new project we (myself and some colleagues I know) start, we set warnings to compile errors by default. We end up with a clean code base, easy solution. (Plus, we also enable FxCop, StyleCop issues as errors, very low cost if you do it from the beginning). Every warning has some impact on quality, maintainability, ...


4

Item level permissions will require both database modelling and application enforcement. Essentially, You'll want to create an "item security" table that relates the RowIDs and PermissionIDs to each other. The application will then have to determine if the current user has the right permissions to view the item that they requested. The database can also ...


1

The server encodes the state of all input elements in the hidden field named __VIEWSTATE. Have a look at the rendered HTML and you can see it in the <div class="aspNetHidden"> element somewhere on the top. When the form is submitted, both values from the HTML input form elements and the value in the hidden input element __VIEWSTATE are submitted ...


1

ASP.NET generates javascript that attaches to the onchange event causing a postback. Part of the data sent in the postback/viewdata/viewstate includes what caused the postback with a translation from the client side event to the server side event. Don't forget - ASP.NET renders normal HTML - on the browser it is just a <textarea> or <input ...


1

There is no definitive answer: some people will be inclined to add comments to every class and method; others will try to avoid commenting things which are already explicit enough. If you follow StyleCop default rules, you have to comment every member, including private fields. You might want to suppress the warnings if the code is really repetitive. But ...


1

A method that I have used is to allow Admins to effectively assign discontinued users to a role marking those users as such. The role can be called whatever you like, such as "Disabled", while active users would be assigned to a role of "Active". Then I just prevent access via the Authorize annotation at the Controller(s) level: [Authorize(Roles = ...



Only top voted, non community-wiki answers of a minimum length are eligible