8/23/12

Protect Your Form Postback with Anti-Forgery

og-bit.com To secure a web page postback from malicious exploits, we can add a security token as a hidden field to the form or a cookie. When a postback is received, this token is validated to make sure that the request is not a cross-site request forgery. When working with Razor Web Pages and...

8/21/12

Deploy Website from WebMatrix to Azure

og-bit.com If you have created a web application on WebMatrix and want to host this application on a Windows Azure website, you will need to take a few additional steps to make sure your web application gets deployed to the correct location of your website. After creating the website on Windows...

8/19/12

Functions in ASP.Net Razor Web Pages

When using Razor Web Pages, it is very common to embed dynamic content on the HTML markup by using a server variable with the following format: @{    var message = "Hello"; } <!DOCTYPE html> <html lang="en">     <head>         <meta charset="utf-8" />         <title></title>    ...

8/12/12

SharePoint XsltListViewWebPart Remove CheckBoxes for Custom Views

When displaying a list view with items, the XsltListViewWebPart adds by default a check box on the header (to select all the items) and to each row. The purpose of the checkbox is to select one or more items to enable some custom actions on the ribbon. An example of a list view with checkboxes...

8/9/12

SharePoint How to Prevent Edit Item Form Submit

In SharePoint, the Edit Item Form is used to update a list item. In some instances, we may want to prevent the user from updating the record because of some rule validation and block the form submit on the client side. On a simple HTML form, we could use the preventDefault() function or just return false from the raised event handler, but this does not work on SharePoint because the Save button calls...