CREATEPROCEDURE[dbo].[GetPermission]@userName varchar(50),@permission int output
ASBEGINselect@permission = PERMISSION from USERS where UserName =@userName
END;
C# | Inheritance Inheritance is an important pillar of OOP(Object Oriented Programming). It is the mechanism in C# by which one class is allowed to inherit the features(fields and methods) of another class. Important terminology: Super Class: The class whose features are inherited is known as super class(or a base class or a parent class). Sub Class: The class that inherits the other class is known as subclass(or a derived class, extended class, or child class). The subclass can add its own fields and methods in addition to the superclass fields and methods. Reusability: Inheritance supports the concept of “reusability”, i.e. when we want to create a new class and there is already a class that includes some of the code that we want, we can derive our new class from the existing class. By doing this, we are reusing the fields and methods of the existing class. The symbol used for inheritance is : . Syntax: class derived-class : base-class ...
Razor View Engine VS Web Form(ASPX) View Engine Razor View Engine Web Form View Engine Razor Engine is an advanced view engine that was introduced with MVC3. This is not a new language but it is a new markup syntax. Web Form Engine is the default view engine for the Asp.net MVC that is included with Asp.net MVC from the beginning. The namespace for Razor Engine is System.Web.Razor . The namespace for Webform Engine is System.Web.Mvc.WebFormViewEngine . The file extensions used with Razor Engine are different from Web Form Engine. It has .cshtml (Razor with C#) or .vbhtml (Razor with VB) extension for views, partial views, editor templates and for layout pages. The file extensions used with Web Form Engine are also like Asp.net Web Forms. It has .aspx extension for views, .ascx extension for partial views & editor templates and .master extension for layout/master pages. Razor has new and advance ...
The primary difference is that a Partial View is designed to be rendered within other full Views and as a result it will not contain all of the markup that a full View might ( since it is designed to work within other Views ). For example, a normal View might look like this and contain all of the elements present in a traditional HTML page : <!DOCTYPE html> <html> <head> <meta charset = utf-8 /> <title> Example </title> </head> <body> <!-- Your Content Here --> </body> </html> where as a Partial View might only contain a small section that it needs to render and since it should be displayed within an existing View, it won't require the necessary tags like <head>, <html>, etc. because it is implied that these should already be present when a Partial View is rendered. An example partial View might look like this : <div> <!-- Example --> <ul> ...
Comments
Post a Comment