Posts

fibonacci series

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace fibonaci {     public class Program     {         public static void Main(string[] args)         {             int i, count, f1 = 0, f2 = 1, f3 = 0;             Console.Write("Enter the Limit : ");             count = int.Parse(Console.ReadLine());             Console.WriteLine(f1);             Console.WriteLine(f2);             for (i = 0; i <= count; i++)             {                 f3 = f1 + f2;                 Console.WriteLine(f3);                 f1 = f2;       ...

calculator using oops

using System;        namespace calcu    {        public class calculator        {                        public void sum(int x, int y)            {                int z = x + y;                Console.WriteLine(z);              }    public void sub(int x, int y)            {                int z = x - y;                Console.WriteLine(z);              }                public void sqrt(double x)            {                double...

Bubble Sort

using System; public class Program {     static void bubbleSort(int []arr)     {         int n = arr.Length;         for (int i = 0; i < n - 1; i++)             for (int j = 0; j < n - i - 1; j++)                 if (arr[j] > arr[j + 1])                 {                     // swap temp and arr[i]                     int temp = arr[j];                     arr[j] = arr[j + 1];                     arr[j + 1] = temp;                 }     }       /* Prints the array */     static void printArray(int []arr)   ...

saveInTheEditor

using System; public class Program { public static void Main() { string str = "saveInTheEditor"; char[] a = str.ToCharArray(); for(int i = 0; i < a.Length; i ++) {           if(i == 0) { str =  str.Replace(a[i].ToString(),a[i].ToString().ToUpper() ); } if(char.IsUpper(a[i]) == true) { str =  str.Replace(a[i].ToString(), Environment.NewLine + a[i].ToString() );           } else { }           }               Console.WriteLine(str); } } output----- Save In The Editor

Authentication in Asp Dot Net

Types of Authentication in Asp Dot Net Introduction Authentication and authorization both are most important things for any system and application. This blog starts with authentication and authorization concepts and after that explains the three default important ways and three custom authentication ways for doing authentication and authorization i.e. windows, forms ,passport, multipass, JWT  and SAML authentication. Plus, in this blog I will explain some fundamental concepts about the different authentication system. Authentication and Authorization Authentication is the process for checking the identity of a user based on the user’s credentials. Generally, user’s credentials are  in the form of user ID and password, and we check their credentials from database or equivalent alternative, if it exists then user is a valid candidate for next process – authorization. Authorization also known as “Permission Control” will come after authentication. Authorization is th...

Razor View Engine VS Web Form(ASPX) View Engine

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 ...

ASP.NET MVC VS WebForms

Difference between ASP.NET MVC and WebForms Asp.Net Web Forms Asp.Net MVC Asp.Net Web Form follow a traditional event-driven development model. Asp.Net MVC is a lightweight and follows MVC (Model, View, Controller) pattern based development, model. Asp.Net Web Form has  server controls. Asp.Net MVC has HTML helpers. Asp.Net Web Form supports  view state for state management at the client side. Asp.Net MVC does not support view state. Asp.Net Web Form has file-based URLs means file name exist in the URLs must have its physical existence. Asp.Net MVC has route-based URLs means URLs are divided into controllers and actions and moreover it is based on controller not on physical file. Asp.Net Web Form follows Web Forms Syntax Asp.Net MVC follow customizable syntax (Razor as default) In Asp.Net Web Form, Web Forms(ASPX)  i.e. views are tightly coupled  to Code behind(ASPX.CS) i.e. logic. In Asp.Net MVC, Views and logic are kept se...