Posts

Showing posts from October, 2018

Override Authorize Filters in MVC

Image
Override Authorize Filters in MVC Authorize Filter: It is to limit the access for a user or user specific to the role. Implementation of Override Authorize filters in MVC Step1: Add a controller and named it as HomeController Add [Authorize] attribute before an action or a controller based on the requirement. Suppose user want to restrict the access of particular controller but allow some of action of that controller. So just add [Authorize] before controller                using System; using System.Web.Mvc; using System.Web.Mvc.Filters; namespace WebApplication1.Controllers {     [ Authorize ]     public class HomeController : Controller     {     } } Step 2: Create a class and named it as OverrideAuthorizeAttribute which should inherit AuthorizeAttribute and Implements IOverrideFilter    public ...

Currency Converter

Image
                Currency Converter Write the below code in view Default.aspx   < script type ="text/javascript" src ="http://code.jquery.com/jquery-1.8.2.js"></ script >         < script type ="text/javascript">             $( function () {              $( '#btnConvert' ).click( function () {               debugger ;               var amount = $( '#txtAmount' ).val();                var from = $( '#ddlfrom' ).val();                var to = $( '#ddlto' ).val();      ...