Wednesday 23 April 2014

What is the StateFull control in Asp.net

 By default Web is stateless because of HTTP protocol. Stateless means every request is identified as new request. If Asp.Net controls are used , they write code implicitly to maintain their state.

What web server we use for Asp.net Environment

IIS webServer or Casini WebServer.

What is Code-Behind Method?

In this method we separate aspx code and Html/JS code into two separate files.

How many types of Web Server controls in Asp.net

 There are nine type of web server controls in Visual Studio 2010. Those are
1. Standard Controls
2.Data Controls
3.Validation Controls
4.Navigation Controls
5.Login controls
6.Webparts
7.Ajax Extensions
8.Dynamic Data
9.Repoting

What is QueryString in Asp.Net

If we can maintains the State between two pages is known as QueryString .

What is ASP.Net 4.0 Features

1. MEF 
2.DLR Runtime( Dynamic Runtime)

How many languages Supports Asp.net

Asp.Net Supported 44 languages

What is the In-Page Technique in Asp.Net

In this method we will create single file only with .aspx extention. This file will be split into two parts. one part will be ServerSide (s/s) code and remaining part will be design code. 
Server side code part is identified not with <% ----%> block but with again <Script> tag with an attribute runat="server".

How to Consume Application /Session objects for our Project in Asp.Net

We can consume both these objects in two ways
a.      In the form of variables for StateManagement.
b.      In the form of events using Global.ASAX file.
Global.ASAX File :
  1. 1.      These file is called active server application file and it should be located in root directory of projects.
  2. 2.      A project can have only one Global.ASAX file.
  3. 3.      It is called as application file because for every request first these file is executed and then the requested resource.
  4. 4.      The content of Global.ASAX is all application and session  evernts. We can use these file for performing unique tasks related to application.
  5. 5.      By default in an asp.net project it is not added . we have to explicitly add it using add new item. For some of the projects Global.ASAX is compulsory and it is added along with project only like MVC, dynamic data project etc.

What is Size of empty class

ans) 1 byte

How many Controls in Asp.net


Ans) 90 + controls

How to Clear the Gridview using asp.net?

Source code : 


 <asp:GridView ID="GridViewID" runat="server" 
     AllowSorting="true" AutoGenerateColumns="False"
     AllowPaging="true" CellPadding="4" DataKeyNames="DemoId"               EmptyDataText='No Records Found.'
      ForeColor="#333333" HeaderStyle-Font-Bold="true"  ShowFooter="False" Width="100%" PageSize="5">
   <EmptyDataRowStyle BackColor="White" BorderWidth="0px" />
   <PagerSettings Position="TopAndBottom" />
   <RowStyle BackColor="White" ForeColor="Black" />
   <PagerStyle BackColor="White" />
   <HeaderStyle Font-Bold="False" />
 </asp:GridView>


Server-side code:

Private Sub ClearGrid(ByVal gvw As GridView)
       gvw.DataSource = Nothing
            gvw.EditIndex = -1
            gvw.DataBind()
       
    End Sub
Call the method in Page Load:
If (Page.IsPostBack = False) Then
ClearGrid(GridViewID)
End If

Screen shot of clear Gridview when loading the page :




What are the Hierarchical Data Controls in Asp.net

There are Two types of Hierarchical Data controls 
1.XmlDataSource
2.SiteMapDataSource

What is Data Control in Asp.net

There are different Data Controls available
1. Gridview
2.DataList
3.Repeater
4. DetailsView
5.FormsView
6.ListView

How to validate Server side Controls in Asp.Net

There are six types of server side validations in asp.net . those are
1. RequireFieldValidator
2. CompareValidator
3.RangeValidator
4.ValidationSummary
5.CustomValidator
6.RegularExpresionValidator

What are the State management Techniques in Asp.Net

Webserver remembering the information of the client is known as Statemanagement.
  There are different techniques available here
1. ViewState
2.QueryString
3.Session
4.Application
5.Cache
6.Server.Transfer
   

How to clear the dropdownlist in asp.net ?


 If you want to clear the items then

      Dropdown1.Items.Clear();

       If you want to set the DropDown index to 0 then

      Dropdown1.SelectedIndex = 0;

Which will load first either Page or UserControl in Asp.Net

Page

what is difference between Hyperlink and LinkButton

             Hyperlink and  LinkButton controls look identical. However, there is a significant difference in functionalities.
Hyperlink control :
              It is immediately navigates to the target URL when the user clicks on the control. the form is not posted to the server.
LinkButton :
             It is first posts the form to the server, then navigates to the URL. If you need to do any server side processing before going to the target URL.

What is passport Authentication in Asp.net


  •  It is a third party authentication which means we use another website in order to authenticate our user.        Client makes a request for a secured web  page.     IIS allows user as anonymous which is compulsory in order to implement any other authentication method.        User enters into ASP.Net and this time it redirects user to passport.com website as the user is anonymous and doesn’t hold passport identity.        Now passport will return login page to the user. Where user enters credentials and resubmits to passport. Passport checks and creates identity called Passport Identity. After creating identity it redirects the user back to website. Again IIS allows and this time ASP.Net also allows user with security.

What is VSS ? When it is Used ?

Some Important points:

  • VSS Stands for Visual Source Safe.
  • VSS is nothing but configuration management tool.
  • VSS is a virtual library of computer files.
  • It is a common Repository.
  • In VSS store information like FRS,SRS,Test cases documents.
  • In VSS document read only but not modifying.
  • If we want to modify that first we need to checkout(download) the require file to our local system then modify the file and then checkin (upload) the modified one.          

What is the Authentication in asp.net

Ans)   The process of verifying user credentials against a data source and create identity for the same Is called Authentication

What is difference between Windows Authentication and Forms Authentication


Ans) Forms Authentication :
·        It is used for internet and intranet based Authentication.
·        In Forms Authentication user can able to create their own login name and password. It is basically a cookie based authentication system. Which stores the login name and password in database file.
   Windows Authentication :
  •         It is default authentication provided by the .net FrameWork.
  •         In Windows actual login name and password is used for authentication web pages can make use of the local windows user and Group.

Which Validation Control validate both Server side and Client Side in Asp.Net

Ans)   Custom Validate

What is PostBack in Asp.Net

                 When a form submits to itself as it's action then it is called PostBack Form.
  <Form> tag has an attribute called Action = < programeName> in order to call the required program on submit.
                   All asp.net forms perform PostBack automatically. We don't write any action attribute only for webforms. During rendering it will automatically write action = < Same FormName>

ex: 
<Form ID=<Fname> action = < SameForm> runat="Server">

What is Web Gardening in Asp.net


When we can distribute our application into different processes and same system then it is called as Web Gardening.

What is Page Life cycle of ASP.Net

           Set of sub Programs are executed towards each time of web page processing are called Page Life Cycle .
     There are some events in asp.net

  •  Page Preinit :  This will be executed before memory initialization for webpage.
        Example : Attaching theme, Master page dynamically to webpage is possible using preinit event procedure.
  • Page Init : This will be executed when memory is initialized for webpage.
  • Page Load : This will be executed when submitted data can be placed within page load.
  • Page PreRender : This will be executed before rendering HTML content for server side control.
  • Page Unload : This will be executed once memory is released for webpage.
     Example : Closing Database connection

What is Cookieless Session? Why?


Asp.net uses cookie for making session id travel. This behavior is default and we can change to some other source also if we don’t want to depend on browser.
               Cookieless option is provided by asp.net which means session id will travel using other source and that is using URL.
               URL also travels between request and response but they are visible in the browser which leads to some changes in programming and also some malfunctioning changes.
               During Forms authentication also our ticket travels between request and response using cookie only.same solution i.e URL/URI based ticket is used as alternate for security.
               Both are highly encrypted.
Syntax:
  <system.web>
<sessionstate timeout=”10” cookieless=”true/false”></sessionstate>
</system.web>

What is Web Forming in Asp.net

When we can distribute our application into different processes and different systems is called as Web Forming.

What is Panel in Asp.Net


Panel can act as container for other controls. It is a useful control when we want to scroll the content as well as when we dynamically add the control.
               It is little conditional for different types of browsers. So check in all browsers when panel is used.

What are the Navigation Controls in Asp.Net

       Ans) There are three navigation Controls
a)      Menu Control
b)      SiteMapPath Control
c)      TreeView Control
  1.       Menu Control :   It enables you to add navigational functionality to our web pages. The Menu control supports a main menu and Submenus and allows you to define dynamic menus ( Some times called “ Fly-Out” menus)
  2.       SiteMapPath Control: It displays a navigation path that shows the user the current page location and displays links as path back to home page. The control provides many options for customizing the appearance of the links.
  3.       TreeView Control : It displays hierarchical data in a tree structure in a web pages. The TreeView control is made up of tree node objects. TreeView control can be bound to data.

What is default Authentication Mode in Asp.Net

 Ans) Windows Authentication.

What is Cache in Asp.Net and how many types of Caches in Asp.net

                     Programmed memory area for storing some results are called Caching.
It is  increase the performance of the application, By avoiding processing. Caching effects integrity if not handled properly.
                      There are three types of Caching

  1. Page Out Put Caching
  2. Data Caching
  3. Fragment Caching
  • Page Out put Caching :  In this Caching we cache the entire processed page out put. When a user makes request for a page it will be processed and the stores results of that entire page in cache for specific duration. During this time any request will be served from cache. Once the time is elapsed the cache page is removed and next request is processed and cached. This cycle continues for a page resulting in good performance.
                                               First and second requests are automatically maintained by server. But for caching request we have to explicitly cache a page using a directive.
<%@ outputcache Duration=n VaryByparam="none/value">
  • Data Caching :  
               *  This is implemented using "Cache Object"
               *  It is good replacement for application variables/state
               *  All drawbacks of application variables are resolved using Cache Object.
  • Fragment Caching :  Fragment Caching means Partial page out put caching. It is a concept but not a command or directive for implementing. We will use the existing concept like Output cache directive and web user control in order to implement this type of caching.

What is XML DTD

                             DTD Stands for Document Type Declaration. The purpose of a DTD is to define the structure of an XML document.It defines the structure with a list of legal elements.
             
                             <! DOCTYPE note
                              [ <!ELEMENT note(to, from,heading,body)>
                               <!ELEMENT note to(#PC DATA)>
                               <!ELEMENT note from (#PC DATA)>
                                <!ELEMENT note heading(#PC DATA)>
                             <!ELEMENT note body(#PC DATA)>]>

What is difference between Eval and Bind

Eval : It will retrieve data from Data Object.
  
       Syntax: <%# Eval("FieldName")%>

Bind : It will retrieve data from data object as well as Update the data with data object. It is two may method. It is Conditional.

 Syntax: <%# Bind("FieldName")%>

What is DataList in Asp.Net


Ans) DataList provides Design features when compared with Repeater. DataList is a UnStructured control.     It also provides RAD features for providing some difficult and customized presentation. It’s unique feature is “Repeating Columns” for every Item Template/Record Data. In Simple terms it displays records in the forms of columns. No other controls have its property. If we want the output like records in columns then go for DataList.

How to communicate webservers with another layers in .Net

Using Protocals like SOAP (Simple Object Access Protocal)

How many Web.config file can place in Application

 No.of web.Config files

What modal will use in Asp.Net Application

Code Behind model

What is difference between User controls and Custom Controls


Ans) User Control:
  • ·        It is predefined attribute functionality where it resides in control library.
  • ·        It is easy to create.
  • ·        Good static Layout.
  • ·        It  cannot be added to toolbox in Visual Studio
  • ·        Limited support for customers who use visual design tool.
  • ·        Separate copy of the control is required in each application.

Custom Control :
  • ·        Custom control is defined by user itself and store in custom library.
  • ·        It is harder to create
  • ·        Good dynamic layout.
  • ·        Can be added to toolbox in Visual Studio.
  • ·        Full support for Customers
  • ·        Only a single copy of the control is required in GAC.

If cookies are disabled can we perform forms authentication

Ans)  NO.

What files we cannot give to the Client

Source files we can not provide to the client.

What is difference between Machine.Config and Web.Config


Ans) 
   Machine.Config :  Machine.Config is for all applications and located in .Net FrameWork Folder.
     Web.Config : Web.config is only for current application and we can use for our projects.

What is use of IIS Server in .Net

IIS Stands for Internet information service

What are the .Net FrameWork versions and Differences

There are different versions in .net Framework 1.0, 1.1, 2.0, 3.0, 3.5, 4.0 and 4.5 versions.
Main Differences of those is 

The first difference of  1.1 and 2.0 :

Next one is 2.0 and 3.0:

Next difference is 3.0 and 3.5 :

Next difference is 3.5 and 4.0 :

Next difference is 4.0 and 4.5


Why PostBack concept is must or forced in Asp.net

                    Asp.Net provides State management for it's controls automatically and for this logic it needs a PostBack concept.

What is caching in Asp.Net

 Caching is a programmed memory area for storing some results. To increase the performance of the application. By avoiding processing . Caching effects integrity if not handled properly.
 There are three types of Caching
          1.Page OutPut Caching
           2. Data Caching
           3. Fragment Caching

What are the Gridview Events in ASP.Net

There are different types of gridview Events . Those are 
1.Sorting
2.Sorted
3.selectedIndexChanged
4.RowUpdating
5.RowUpdated
6.RowEditing
7.RowDeleted
8.RowDeleting
9.RowDataBound
10.RowCreated
11.RowCommand
12.RowCancelingEdit
13.PageIndexChanging
14.PageIndexChanged

What is difference between Master page and Web User Control


Ans) Master Page :
  •         Both are code reduce features and reusability.
  •          Master page are used to provide consistent layout and common behavior for multiple pages  in our application then we can add the content place holder to add child pages custom content.
  •         It extension is .Master

WebUser controls :
·        Same process in Web user controls also.
·        User controls are used when we have requirement on specific criteria.
·        Sometimes we need the functionality in our pages which is not possible using the built-in web server controls then user can create his own controls called user controls using asp.net built-in controls.
·        It ‘s extension is .ASCX

What are the default properties for the Validation Controls

ControlToValidate and ErrorMessage

How to change the textbox boarder style in .net?

I can to change the boarder style of the textbox.



the syntax to change the boarder style.

txtbox1.BorderStyle = BorderStyle.blue
txtbox1.BorderWidth = 1

txtbox1.BorderStyle = BorderStyle.None
txtbox1.BorderWidth = 1

txtbox1.BorderStyle = BorderStyle.solid
txtbox1.BorderWidth = 1 

What is Cross page PostBack in Asp.Net

 This concept is added in Asp.Net 2.0 and allows user to submit page content to different page instead of same page.This leads to loading a new page. In this method also current page values are implicitly (Without any option) transferred.
PostBackurl property for PostBack control can be used for this page.

What are the tabular Data Controls in Asp.Net

There are Five Tabular Data Controls 
1.SqlDataSource
2.ObjectDataSource
3.LinqDataSource
4.EntityDataSource
2.AccessDataSource

What is the Anonymous Authentication in Asp.Net


Ans) If we set anonymous access at IIS level for a web application then user need not give any credentials but still identity will be provided with auto-generated username/password. We can also specify particular username/password for our users. The it is called Anonymous Authentication.

To get the requested page which method will use in .Net

 Options) 


a) Request.url 
b) Response.url 
c) Request.web.UI.url

What is ASP.Net


Ans)  Asp.net is a technology providing set of specifications towards web based application development, This technology comes with .net
               Asp.net supports different types of Web Applications.

·        Normal Web Application :  Web page towards  PC based browser.
·        Mobile Web Application :   Web page towards mobile device micro browser.
·        Web Services : Developing Business logic towards business to business implementation.
·        Ajax Web Application : Developing web pages with ajax specification then will avoid complete page submission and reloading webpage.

What is Smart Navigation in Asp.Net


Ans) Smart Navigation is the basically enhances a web pages performance by doing the following.
  •         It eliminates the flash caused during navigation.
  •        It persists scroll position during post backs between pages.
  •        It Retains the lasts page information in the history of the browser.

How to kill the Session Explicitly in Asp.Net

session.Abandon()

What is IIS in .net

IIS stands for Internet Information Services

Where we can store the Cookie values and Session values in Asp.net

Cookie values can be stored in client Side and Session values can stored in Server Side

What is Size of Object in .Net

NO fixed for object and Based on the requirement we can set the size for object.

What is Forms Authentication in Asp.Net


  1.    In  Forms Authentication Asp.net only performs authentication using the data source defined by user. It is most suitable for commercial web application or internet based application.
  2.     Client makes the request for secured web page.
  3.       IIS will allow the user as anonymous and redirects the user to asp.net
  4.     Now asp.net checks for forms authentication ticket, in absence sends login.aspx page to client. This page should be created by user and it should be also be in root directory of application.
  5.        Client enters the required credentials and resubmits the same to asp.net (via IIS) Asp.net process the form and creates forms authentication ticket.
  6.        Now Asp.net redirects secured page to user.

What is Gridview in Asp.Net

        Gridview control is a structural control and it is in tabular format like Rows and Columns
·        It has very rich features like sorting, paging, editing and updating are provided in “RAD” (Rapid application Development) as well as in programmatic model. In project, we use programmatic model not RAD.
·        The first feature of Gridview is “AutoGeneratingColumn” based on data objects. It has a property called “AutoGeneratingColumn” by default is TRUE. When this is set to False. No output is produced by Gridview on its own.
·        Gridview provides a collection called “Columns” where we can provide it’s structure
·        Column is a collection of Gridiew Fields which are also provided by Gridview.
Important Fields of Gridview are
--- BoundField
--- TemplateField
---  CommandField
  1.  BoundField :  BoundField is the simplest among all fields and it is used to present data objects one field  data. It is simple in presentation i.e Simple text can be displayed and also limited in options.
  2. TemplateField : Unless BoundField, TemplateField is more rich in presenting output’s and it is complex with many options “ it is a collection of Templates”


                             Every Template has a use and we have to understand the use of template and produce the Output.
                              It is also an attribute based and if a task can be performed using an attribute then it is preferred.
                              “TemplateField or It’s templates doesn’t have any attribute for getting data object or data(like datafield of BoundField) So to get data from data object templateField used “Asp.net Data binding Expression”
 There are three main templates in TemplateField
                       a) Header Template
                       b) Item Template
                       c)Edit Template

  1. CommandField : This field will display edit,update,delete and cancel action buttons. It is exclusively used for editing actions for Gridview data.


                              This field is also dependent on edit index. It display edit/delete when editIndex is “-1” for all rows and for n th row is displays update and cancel.

what is Handler in asp.net

                     A Handler is a program that is written and integrated with IIS/Run time. Handlers are provided by web server/server side softwares and finally they can be created by user.

What are the three Validation controls in Asp.net

Three validation Controls in Asp.net.
 Those are 
 1. RequiredField Validator
 2. Regular Expression Validator
  3. Compare Validator

Ajax three controls in Asp.Net

 there are Two technquies in Ajax.

  1.   Server side ajax controls
  2. Client side ajax controls
  • Server side  ajax control: 
  1.  Script Manager
  2. Update panel
  • Client Side controls 
  1. MaskedTextbox
  2. Calender control
  3. tab control
and also different controls is there in Ajax.

What event will fire when we click on the LinkButton

 Click event

What is base class of Webforms in Asp.Net

System.Web.UI.Page

What is Machine.Config in Asp.Net


Ans) 
   Machine.Config :  Machine.Config is for all applications and located in .Net FrameWork Folder.

What is starting Event of Session in Asp.Net


 void Session_Start(object sender, EventArgs e) 
    {
        // Code that runs when a new session is started

    }

Is Validation controls validate Server side or Client Side in Asp.Net

Ans) Both. Based on the Requirement we can using validations at Server side or Client Side

What is In-Process Session in ASP.NET

By default sessions are maintained as in-process session which means they are within the application process and also dependent on application for load balancing and other options

What is Out-Process Session in ASP.Net

Out process means sessions are maintained separately with another process then which leads to session independent of application.

Which validation control will accept Null values in Asp.Net

Ans) RequiredField Validator

What is impersonation in Asp.Net


Ans) The process of providing an identity with sername/password at application level or IIS level is called Impersonationg users or Impersonation.
               <configuration>
               <system.web>
             <Identity impersonate=”true” username=”guru”   password=”123”/>
           </System.web>
          </Configuration>

How to populate DataGrid from Dataset in Asp.net


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

 SqlConnection con = new Sqlconnection("User id =sa; pwd="123" server="ServerName" DataBase="DataBaseName");
          SqlDataAdapter da = new SqlDataAdapter("Select * form employee" ,con);
           DataSet ds = new DataSet();
      da.Fill(ds,"Employee");
dataGrid.DataSource =ds.tables[0].DefaultView;
dataGrid.DataBind();

        }
    }
}

What Algorithms used for Security

Ans) SHA/MD5 or SSL

what is difference between DataSet.copy() and DataSet.clone()

DataSet.copy() :
  • DataSet.Copy() method copies both the structure and data.
Example of clone(): 
                      <pre lang="cs">
                      DataSet dswtihdata;
                     DataSet dsnew;
                     dsnew=dswithdata.copy();


DataSet.Clone() :

  • DataSet.clone() method copies the structure of the DataSet including all the datatable schemas, relations and constraints. 
  • But Doen't copy any data.
Example of clone(): 
              DataSet ds; //This is containing Data table schema.
              DataSet ds1;
              ds1= ds.clone();
                        

what is difference between Typed DataSet and UnTyped DataSet

                  We can generate typed DataSet based on single table or multiple tables which are related by using primary or foreign key relationships through visual studio which generates a XSD File. This is strongly typed in-memory cache of data.
                      Untyped DataSet is one which is filled/generated using a DataAdapter and a command object.

What is difference between Cookie and Session in Asp.Net

Cookie:
  • Cookie support only plain text representation
  • Cookie is having limitations in terms of number and size
  • Cookie doesn't provide Security
  • Cookie will reduce burden on server compared to Session

Session:
  • Session support representing object 
  • Session doesn't have limitation for number and size
  • Session provides security

How server identifies a Program as Client side or Server Side


ans)  based on Extension

What is MultiTargetting in .Net

One of the greate feature of .net/vs.net is multitargetting .net platform. Every VS Version or every program that we write can target specific .net Platform starting from V2.0

What is Web Server in Asp.Net? Why?


Web server is a software which runs as services  under server model operating system and which is responsible to serve all requests made in the form of HTTP.
               All web applications must and should run under web server environment only. If any body wants to create a new website. They must have web server installed and then create website

How to open new window using Asp.net ?


Protected Sub lbnDemo_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Try
        
            ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "window", "ViewInternalID();", True)
        Catch ex As Exception
            SetUserMessage(ex.Message, MessageType.ErrorMessage)
            ErrorSignal.FromCurrentContext.Raise(ex)
        End Try
    End Sub


<script type="text/javascript">

 function ViewInternalID()
  {
  window.open(" Default .aspx",'_blank','width=800px,height=500px,scrollbars=yes, status=no, resizable');
   }
 
   
    </script>

how to fix column width of gridview in asp.net ?




protected void gridView_RowDataBound(object sender, GridViewRowEventArgs e)  
  {     
   if (e.Row.RowType == DataControlRowType.Header)   
     {          
  for (int i = 0; i < gridView1.Columns.Count; i++)    
        {   
    
         e.Row.Cells[i].Attributes.Add("Style", "Width:25px");    
        }  
      }
}

How to populate the Gridview in page in Asp.Net

 using System;
using System.Data;
using System.Data.SqlClient;


public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       SqlConnection con = new Sqlconnection("User id =sa; pwd="123" server="ServerName" DataBase="DataBaseName");
          SqlDataAdapter da = new SqlDataAdapter("Select * form employee" ,con);
           DataSet ds = new DataSet();
      da.Fill(ds,"Employee");
Gridview1.DataSource =ds;
Gridview1.DataBind();

    }
}

What is Web.Config and use in Asp.Net

Web.Config : Web.config is only for current application and we can use for our projects.

What is Asp.net IDE’S?

           We write Html using a simple texual editor i.e NotePad. In general most of developers use "Integrated development Environment" for developing an application. Prior to asp.net we had ASP for web development. Which had no IDE of it's own . ASP.Net form the day it is related it has it's own IDE which is one of the world class IDE called Visual Studio .Net" . VS.Net is not .net but it is an IDE for .Net.
             VS.Net has so many features to make application development faster and simpler. From .Net 3.0 version M.S added another IDE for ASP.Net as well as for other .Net based development and that is "MS Expression".
              This tool/IDE is more meant for designing issues @ higher level and it is highly recommended to use these tools for developing versions types of application.
     

what is difference between Cell Spacing and Cell Padding

Cell Spacing :
                  Space between cell border.
Cell Padding :
                  Space between cell border and cell content.

What is Master page ? Why?

Master pages are used to provide consistent Layout and common behavior for multiple pages in our application. Then we  can add content placeholder to add child pages  custom content.

what is difference between String and StringBuilder

String :
  • String is the Immutable.
  • Data value may not be changed and variable value may be changed.
  • We can use the memory  size is cannot be increased.
  • Namespace of the String is System.Text.
StringBuilder :
  • StringBuilder is mutable.
  • Data value may be changed and also variable value may be changed.
  • Which we can used for memory size is can be increased like append, insert and etc......
  • StringBuilder is faster than Strings.
  • NameSpace of the StringBuilder is System.Text.StringBuilder.

What is Cookie and how many types of Cookies in Asp.Net

 Cookie: Cookie is a small amount of memory used by web server within client system.

  •  The main purpose is maintaining personal information of client within Client system to reduce burden  on server.
   cookie can be classified into two types
  1.   In-Memory Cookie
  2. Persistent Cookie        
 In-Memory Cookie : The Cookie placed within browser process memory is called In-Memory Cookie
  • It is temporary Cookie specific to browser instance. Once browser will be closed ,Cookie will be erased.
  • Cookie data will be accessible to all the web pages with client request.
  • .Net providing HTTPCookie class for sending Cookie or Reading Cookie
Sending Cookie :

example: Httpcookie obj= new httipcookie("n")
                                           obj.value="100";
//Cookie can represent only String data.
      Response.AppendCookie(obj);
//It will send cookie to client Browser.

Reading Cookie submitted by Client (Browser) :
  
   Example:   HttpCookie obj=null;
                         obj=Request.Cookie["n"];
//It returns cookie class object 
//If cookie is available with request

If(obj==null)
  //no cookie submitted
else
obj.value
//returs Cookie value


Persistent Cookie :  Cookie placed with in hard disk memory of client system is called persistent cookie.
  • This will be maintained by client system with particular life time .[Life time will be 1 min,1 hour, 1 year .........]
  • Once Life time is finished cookie will be erased by client system operating system.
example:  Httpcookie obj = new Httpcookie("n");
                                           obj.value="100";
                     obj.expires=DateTime.Now.AddDay(2)  // lifetime is 2 days
                       Response.AppendCookie(obj);
//Persistent cookie= in-memory cookie + Life time