h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

Local Temp Table vs Global Temp Table

Local Temp Table vs Global Temp Table
S.NoParticularsLocal Temp TableGlobal Temp Table
1Available SQL Server session or connection (means single user) all SQL Server sessions or connections (means all the user).
2deleted These are automatically deleted when the session that created the tables has been closedThese can be created by any SQL Server connection user and these are automatically deleted when all the SQL Server connections have been closed.
3stared with signLocal temporary table name is stared with single hash ("#") sign.Global temporary table name is stared with double hash ("##") sign.

Object Oriented vs Object based Language

Object Oriented vs Object based Language
S.NoParticularsOOL[Object Oriented Language]OBL[Object Based Language]
1SupportAll Features of OOPSAll feature of OOPS
2Built ObjectNoYes
3LanguagesC,C#,JavaVB,Javascripts

ASP.Net Web API vs ASP.NET MVC

ASP.Net Web API vs ASP.NET MVC
S.No Particulars ASP.NET WebAPI ASP.NET MVC
1Create Web Appcreate full blown HTTP services with easy and simple way that returns only data not view.returns both views and data
2support content-negotiationYesNo
3returning dataJSON,XML or any other based upon the Accept header in the request and you don't worry about that.JSON format using JsonResult.
4request are mapped actions based on HTTP verbs mapped to actions name.
5assemblySystem.Web.HttpSystem.Web.Mvc
6mixed MVC and Web API controllerWeb API since boths are different.implement the authorization then you have to create two filters one for MVC

Split Web Page Extention using C#.Net

Split Web Page Extention using C#.Net
using System.Text.RegularExpressions;

string  splitWebPageExtension(string webPage, string extension,int idx)
        {

            Regex Splitter = new Regex(extension);
            String[] Parts = Splitter.Split(webPage);
            string st = Parts[idx];
            return st;
        }
     string webPage = "http://dotnettechrocks.blogspot.in/ ";
     string str = splitWebPageExtension(webPage, ".in", 0);
     MessageBox.Show(str);

Result :http://dotnettechrocks.blogspot

Cluster vs NON-Cluster Index

Cluster vs NON-Cluster Index
S.NoParticularsClusterNON-Cluster
1data rows sort and store the data rows in the table or view based on their key values.have a structure separate from the data rows.
2ReadFaster to read than NON-Cluster
3StorePhysically, Store Index Order
4Faster Insert/UpdateQucikly Insert and Update Data than a Cluster Index.
5TableOnly One Per Tablecan be used many time per Table
6OrderData is in Physical OrderLogical Order

Function vs Methods


Function vs Methods
S.NoParticularsFuncitonMethods
1independent existence they can be defined outside of the classthey are always defined with in class
2languages Structure languages object oriented languages
3independentlycalled independently.called using instance or object.
4Functions are self describing unit of code.Methods are used to manipuate instance variable of a class

Web Services vs WCF


Web Services vs WCF
S.No Particulars Web services WCF
1Support SOAPYesYes
2SupportHTTPTCP, HTTP, HTTPS, Named Pipes, MSMQ.
3Return DataXMLXML
4Open SourceNo, can be consumed by any client that understands xml.No, can be consumed by any client that understands xml.
5Hostonly IISIIS or Windows Services

Create Directory Date Format in C#.Net

This is a Code for "Create Directory Date Format in C#.net"

using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.IO;
 namespace GetOfficeVersion
 {
class ClsDirectory
 {
 public static void CreateDirectory(string DesignationPath)
 {
 if (!Directory.Exists(DesignationPath))
 {
 Directory.CreateDirectory(DesignationPath);
 }
 }
 public static string currentYear()
 {
 string Year = string.Empty;
DateTime dt = DateTime.Now;
string format = "yyyy";
 Year = dt.ToString(format);
 return Year;
 }
 public static string currentMonth()
{
 string Month = string.Empty;
 DateTime dt = DateTime.Now;
 string format = "MM";
 Month = dt.ToString(format);
 return Month;
 }
 public static string currentDate()
 {
string day = string.Empty;
 DateTime dt = DateTime.Now;
string format = "dd";
day = dt.ToString(format); return day;
}
}
}

Model View Controller


Today, we see What is mean by MVC [Model View Control]
Model:
  1.  Model is basically a C# or VB.Net Class.
  2.  Model is accessible by Both Controller and View.
  3.  Model can be used to pass data from Controller to View.
  4.  View can use model to display data in Page.
View:
  1.   View is an ASPX Page without having a Code Behide file.
  2.   All Pate specific HTML generation and formatting can be done inside view.
  3.   One can use inline Code(Server tags) to develop dynamic pages.
Controller:
  1.   Controller is a basically a C# or VB.net class which inherits System.MVC.Controller.
  2.   controller is a Heart of Entire MVC Architecture.
  3.   Inside Controller's Class action methods can be implemented which are responsible to responding to browser or calling views.
  4.   Controller can access and use model class to pass data to views
  5.   Controller uses ViewData to pass any data to view.
MVC Artchitecture :
Comparison Artchitecture:


Mandatory Label

Introduction:
     Today , we discussed about Mandatory Label in C#.Net.  This label intimate to user ,It is a Mandatory Field.
 
 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Windows.Forms;
 using System.Drawing;
 namespace StaffingSolutionV1.UtilityLayer
 {
 class MandatoryLable :Label
 {
 public enum StatusManLabel
 {
 False,
True
 };
 private StatusManLabel m_Status;
 public string AddSymbol
{
 get;
set;
 }
 public StatusManLabel StatusLabel
 {
 get
 {
return m_Status;
 }
 set
 {
 if (value == StatusManLabel.True)
 {
 this.Text = AddSymbol + " " + this.Text; }
 else
 {
 AddSymbol = ""; this.Text = "";
 }
 m_Status = value;
 }
 }
}
}