net questions and answers

Upload: arjun-mv

Post on 05-Apr-2018

231 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 .Net Questions and Answers

    1/73

    Page 1

    Ques: 1 What does the keyword virtual declare for a method?Ans:

    The method or property can be overridden.Ques: 2 Tell me implicit name of the parameter that getspassed into the set property

    of a class?

    Ans:

    The data type of the value parameter is defined by whatever datatype the property is declared as.Ques: 3 What is the difference between an interface and

    abstract class ?

    Ans:

    1. In an interface class, all methods are abstract and there is noimplementation. In an abstract class some methods can be concrete.2. In an interface class, no accessibility modifiers are allowed. Anabstract class may have accessibility modifiers.Ques: 4 How to Specify the accessibility modifier for methods

    inside the interface?

    Ans:

    They all must be public, and are therefore public by default.Ques: 5 Define interface class ?

    Ans:

    Interfaces, like classes, define a set of properties, methods, andevents. But unlike classes, interfaces do not provide implementation.They are implemented by classes, and defined as separate entitiesfrom classes.Ques: 6 When you declared a class as abstract?

    Ans:1. When at least one of the methods in the class is abstract.2. When the class itself is inherited from an abstract class, but not all

    base abstract methods have been overridden.Ques: 7 Define abstract class?

    Ans:

  • 7/31/2019 .Net Questions and Answers

    2/73

    1. A class that cannot be instantiated.2. An abstract class is a class that must be inherited and have themethods overridden.3. An abstract class is essentially a blueprint for a class without any

    implementationQues: 8 How to allowed a class to be inherited, but it must be

    prevent the method from being over-ridden?

    Ans:

    Just leave the class public and make the method sealed.Ques: 9 How to prevent your class from being inherited by

    another class?

    Ans:

    We use the sealed keyword to prevent the class from beinginherited.Ques: 10 What class is underneath the SortedList class?

    Ans:

    A sorted HashTable.Ques: 11 What is the .NET collection class that allows an

    element to be accessed using a unique key?

    Ans:

    HashTable.Ques: 12 Difference between the System.Array.Clone() and

    System.Array.CopyTo()?

    Ans:

    The Clone() method returns a new array (a shallow copy) objectcontaining all the elements in the original array. The CopyTo()

    method copies the elements into another existing array. Bothperform a shallow copy. A shallow copy means the contents (eacharray element) contains references to the same object as theelements in the original array.A deep copy (which neither of these methods performs) would

    create a new instance of each element's object, resulting in a

  • 7/31/2019 .Net Questions and Answers

    3/73

    different, yet identacle object.Ques: 13 Difference between System.String and

    System.Text.StringBuilder classes?

    Ans:

    System.String is immutable. System.StringBuilder was designedwith the purpose of having a mutable string where a variety ofoperations can be performed.Ques: 14 What is the top .NET class that everything is derivedfrom?Ans:

    System.Object.Ques: 15 How can you automatically generate interface for the

    remotable object in .NET?Ans:

    Use the Soapsuds tool.Ques: 16 How to configure a .NET Remoting object via XML

    file?

    Ans:

    It can be done via machine.config and application level .config file(or web.config in ASP.NET). Application-level XML settings take

    precedence over machine.config.Ques: 17 What is Singleton activation mode?Ans:

    A single object is instantiated regardless of the number of clientsaccessing it. Lifetime of this object is determined by lifetime lease.Ques: 18 What security measures exist for .NET Remoting?Ans:

    None.Ques: 19 In .NET Remoting, What are channels?

    Ans:Channels represent the objects that transfer the other serializedobjects from one application domain to another and from onecomputer to another, as well as one process to another on the same

    box. A channel must exist before an object can be transferred.Ques: 20 What are remotable objects in .NET Remoting?

  • 7/31/2019 .Net Questions and Answers

    4/73

    Ans:

    1. They can be marshaled across the application domains.2. You can marshal by value, where a deep copy of the object iscreated and then passed to the receiver. You can also marshal by

    reference, where just a reference to an existing object is passed.

    Page 2

    Ques: 21 Do you know the proxy of the server object in .NET

    Remoting?

    Ans:

    This process is known as marshaling. It handles the communication

    between real server object and the client object. We can say that Itsa fake copy of the server object that resides on the client side and

    behaves as if it was the server.

    Ques: 22 Give your idea when deciding to use .NET Remoting

    or ASP.NET Web Services?

    Ans:

    1. Remoting is a more efficient communication exchange when you

    can control both ends of the application involved in thecommunication process. 2. Web Services provide an open-protocol-

    based exchange of informaion. Web Services are best when youneed to communicate with an external organization or another(non-.NET) technology.Ques: 23 Define the possible implementations of distributedapplications in .NET?Ans:

    .NET Remoting and ASP.NET Web Services. If we talk about theFramework Class Library, noteworthy classes are inSystem.Runtime.Remoting and System.Web.Services.Ques: 24 Explain what relationship is between a Process,

    Application Domain, and Application?

    Ans:

  • 7/31/2019 .Net Questions and Answers

    5/73

    A process is an instance of a running application. An application isan executable on the hard drive or network. There can be numerous

    processes launched of the same application (5 copies of Wordrunning), but 1 process can run just 1 application.

    Ques: 25 Whats typical about a Windows process in regardsto memory allocation?

    Ans:

    Each process is allocated its own block of available RAM space, noprocess can access another process code or data. If the processcrashes, it dies alone without taking the entire OS or a bunch ofother applications down.Ques: 26 Whats a Windows process?

    Ans:Its an application thats running and had been allocated memory.Ques: 27 Using XSLT, how would you extract a specific attributefrom an element in an XML document?Ans:

    Successful candidates should recognize this as one of the most basicapplications of XSLT. If they are not able to construct a replysimilar to the example below, they should at least be able to identify

    the components necessary for this operation: xsl:template to matchthe appropriate XML element, xsl:value-of to select the attributevalue, and the optional xsl:apply-templates to continue processingthe document.Ques: 28 What is SOAP and how does it relate to XML?

    Ans:

    The Simple Object Access Protocol (SOAP) uses XML to define aprotocol for the exchange of information in distributed computingenvironments. SOAP consists of three components: an envelope, a

    set of encoding rules, and a convention for representing remoteprocedure calls. Unless experience with SOAP is a directrequirement for the open position, knowing the specifics of the

    protocol, or how it can be used in conjunction with HTTP, is not asimportant as identifying it as a natural application of XML.Ques: 29 What is main difference between Global.asax and

  • 7/31/2019 .Net Questions and Answers

    6/73

    Web.Config?

    Ans:

    ASP.NET uses the global.asax to establish any global objects thatyour Web application uses. The .asax extension denotes an

    application file rather than .aspx for a page file. Each ASP.NETapplication can contain at most one global.asax file. The file iscompiled on the first page hit to your Web application. ASP.NET isalso configured so that any attempts to browse to the global.asax

    page directly are rejected. However, you can specify application-wide settings in the web.config file. The web.config is an XML-formatted text file that resides in the Web sites root directory.Through Web.config you can specify settings like custom 404 error

    pages, authentication and authorization settings for the Web site,compilation options for the ASP.NET Web pages, if tracing should

    be enabled, etcQues: 30 What is the difference between the value-type

    variables and reference-type variables in terms of garbage

    collection?

    Ans:

    The value-type variables are not garbage-collected, they just fall off

    the stack when they fall out of scope, the reference-type objects arepicked up by GC when their references go null.Ques: 31 Where do the reference-type variables go in the

    RAM?

    Ans:

    The references go on the stack, while the objects themselves go onthe heap. However, in reality things are more elaborate.Ques: 32 Whats the difference between struct and class in C#?

    Ans:

    1. Structs cannot be inherited.2. Structs are passed by value, not by reference.3. Struct is stored on the stack, not the heap.Ques: 33 To test a Web service you must create a windows

    application or Web application to consume this service?

    Ans:

  • 7/31/2019 .Net Questions and Answers

    7/73

    The webservice comes with a test page and it provides HTTP-GETmethod to test.Ques: 34 What is the transport protocol you use to call a Web

    service?

    Ans:SOAP is the preferred protocol.Ques: 35 Can you give an example of what might be best suited

    to place in the Application Start and Session Start

    subroutines?

    Ans:

    This is where you can set the specific variables for the Applicationand Session objects.

    Ques: 36 Where do you store the information about the userslocale?

    Ans:

    System.Web.UI.Page.CultureQues: 37 Where does the Web page belong in the .NET Frameworkclass hierarchy?Ans:

    System.Web.UI.Page

    Ques: 38 Name two properties common in every validationcontrol?

    Ans:

    ControlToValidate property and Text propertyQues: 39 What property must you set, and what method must

    you call in your code, in order to bind the data from some data

    source to the Repeater control?

    Ans:

    You must set the DataSource property and call the DataBind

    method.Ques: 40 How can you provide an alternating color scheme in a

    Repeater control?

  • 7/31/2019 .Net Questions and Answers

    8/73

    Page 3

    Ques: 41 Which template must you provide, in order to display datain a Repeater control?Ans:

    ItemTemplateQues: 42 Can you edit data in the Repeater control?

    Ans:

    No, it just reads the information from its data sourceQues: 43 Which method do you invoke on the DataAdapter

    control to load your generated dataset with data?

    Ans:

    The .Fill() method

    Ques: 44 Describe the difference between inline and codebehind.

    Ans:

    Inline code written along side the html in a page. Code-behind iscode written in a separate file and referenced by the .aspx page.Ques: 45 Whats a bubbled event?

    Ans:

    When you have a complex control, like DataGrid, writing an event

    processing routine for each object (cell, button, row, etc.) is quitetedious. The controls can bubble up their eventhandlers, allowingthe main DataGrid event handler to take care of its constituents.Ques: 46 What is the role of global.asax.

    Ans:

    Store global information about the applicationQues: 47 Can the action attribute of a server-side tag

    be set to a value and if not how can you possibly pass data

    from a form page to a subsequent page.

    Ans:

    No, You have to use Server.Transfer to pass the data to anotherpage.Ques: 48 Can you give an example of when you might use it?

    Ans:

  • 7/31/2019 .Net Questions and Answers

    9/73

    When you want to inherit (use the functionality of) another class.Base Class Employee. A Manager class could be derived from theEmployee base class.Ques: 49 Can you explain the difference between an ADO.NET

    Dataset and an ADO Recordset?Ans:

    1. A DataSet can represent an entire relational database in memory,complete with tables, relations, and views.2. A DataSet is designed to work without any continuing connectionto the original data source.3. Data in a DataSet is bulk-loaded, rather than being loaded ondemand.

    Ques: 50 What is the difference between Server.Transfer andResponse.Redirect?Ans:

    1. Server.Transfer() performs server side redirection of the pageavoiding extra round trip. While The Response .Redirect () methodcan be used to redirect the browser to specified url.2. Server.Transfer is used to post a form to another page.Response.Redirect is used to redirect the user to another page or

    site.Ques: 51 Explain the difference between a databaseadministrator and a data administrator.

    Ques: 52 What is smart navigation?

    Ans:

    Smart navigation is, cursor position is maintained when the pagegets refreshed due to the server side validation and the page getsrefreshed.Ques: 53 What is the difference between Literal and Lable

    Control?Ans:

    We use literals control if we want to typed text using HTMLformating and without using property.We typed HTML code in .csfile when used literals.Lable control when displayed already formated.Typed text can not

  • 7/31/2019 .Net Questions and Answers

    10/73

    be formated in .cs file.Ques: 54 What are the 2 Layouts supported by a Web form in

    ASP.NET?

    Ans:

    1. Grid layout: Pages using grid layout will not always displaycorrectly in non-Microsoft browsers,and controls are placed exactlywhere they draw.It means they have absolute positions on the page.Use grid layout for Microsoft Windowsstyle applications, in whichcontrols are not mixed with large amounts of text.2. Flow layout: Controls relative to other elements on the page.Controls that appear after the new element move down if you addelements at run time.

    Flow layout for document-style applications, in which text andcontrols are intermingled.Ques: 55 Can you specify authorization settings both in

    Web.config and in IIS?

    Ans:

    Yes,It wil be done. For this, the IIS setting is evaluated first and thenthe setting in Web.config is evaluated. Hence we can say,the mostrestrictive setting will be used.

    Ques: 56 How do you determine, what is the role of the currentuser?

    Ans:

    The User object provides an IsInRole method to determine the roleof the current user, as shown in the following example:if(User.IsInRole("Administrators")){///////}

    Ques: 57 How do you get a User Identity?Ans:

    Using the User objects Identity property. The Identity propertyreturns an object that includes the user name and role information,as shown in the following code:

  • 7/31/2019 .Net Questions and Answers

    11/73

    private void Page_Load(object sender, System.EventArgs e){Label1.Text = User.Identity.IsAuthenticated.ToString();Label2.Text = User.Identity.Name;

    Label3.Text = User.Identity.AuthenticationType;}Ques: 58 What is the default authentication method when you createa new Web application project?Ans:

    Windows authentication is the default authentication method whenyou create a new Web application project.Ques: 59 What is the advantage of using Windows

    authentication in a Web application?Ans:

    The advantage of Windows authentication:1. Web application can use the exact same security that applies toyour corporate network like user names, passwords, and

    permissions.2. To access the Web application users logged on to the network. Itis importent that user does'nt logged on again.

    Ques: 60 What do you mean by neutral cultures?Ans:Neutral cultures represent general languages, such as English orSpanish and a specific language and region.ASP.NET assigns thatculture to all the threads running for that Web application.Whenuser set culture attribute for a Web application inWeb.config.ASP.NET maintains multiple threads for a Webapplication within the aspnet_wp.exe worker process.

    Page 4

    Ques: 61 What are the steps to follow to get user's culture at runtime?Ans:

  • 7/31/2019 .Net Questions and Answers

    12/73

    1. Get the Request objects UserLanguages property.2. Use the returned value with the CultureInfo class to create anobject representing the users current culture.

    For example, the following code gets the users culture and displaysthe English name and the abbreviated name of the culture in a labelthe first time the page is displayed:

    private void Page_Load(object sender, System.EventArgs e){// Run the first time the page is displayedif (!IsPostBack)

    {// Get the user's preferred language.string sLang = Request.UserLanguages[0];// Create a CultureInfo object from it.CultureInfo CurrentCulture = new CultureInfo(sLang);lblCulture.Text = CurrentCulture.EnglishName + ": " +CurrentCulture.Name;}

    }Ques: 62 What are the 3 different ways to globalize webapplications?Ans:

    Detect and redirect approach : In this approach we create a separateWeb application for each supported culture, and then detect theusers culture and redirect the request to the appropriate application.This approach is best for applications with lots of text content thatrequires translation and few executable components.

    Run-time adjustment approach : In this approach we create a singleWeb application that detects the users culture and adjusts output atrun time using format specifiers and other tools. This approach is

    best for simple applications that present limited amounts of content.

  • 7/31/2019 .Net Questions and Answers

    13/73

  • 7/31/2019 .Net Questions and Answers

    14/73

    Label Lbl = (Label)Master.FindControl("Label1");if(Lbl != null){Lbl.Text = "R4R HERE";

    }}Ques: 65 Can you dynaimically assign a Master Page?

    Ans:

    PreInit stage using the Page class MasterPageFile property as shownin the code sample below. Using this you can assign a master pagedynamically.

    void Page_PreInit(Object sender, EventArgs e){this.MasterPageFile = "~/MasterPage.master";}Ans:

    void Page_PreInit(Object sender, EventArgs e) {

    if (Request.Browser.IsBrowser("IE")) {

    this.MasterPageFile = "ArticleMaster_IE.master";}else if (Request.Browser.IsBrowser("Mozilla")) {

    this.MasterPageFile = "ArticleMaster_FireFox.master";}else {

    this.MasterPageFile = "ArticleMaster.master";}

    }

    Ques: 66 How do you identify a Master Page and how do you

    bind a Content Page to a Master Page?

    Ans:

    The master page is identified by a special @ Master directive that

  • 7/31/2019 .Net Questions and Answers

    15/73

    replaces the @ Page directive that is used for ordinary .aspx pages.MasterPageFile attribute of a content page's @ Page directive isused to bind a Content Page to a Master Page.Ques: 67 What are the 2 important parts of a master page and

    file extension for a Master Page?Ans:

    The following are the 2 important parts of a master page1. The Master Page itself2. One or more Content PagesThe file extention for Master Page is ".master".Ques: 68 What is a Master Page in Asp.Net?

    Ans:

    For consistent layout for the pages in application used MasterPages.A single master page defines the look and feel and standard

    behavior that you want for all of the pages (or a group of pages) inyour application.Then user create individual content pages that shareall the information and lay out of a Master Page.Ques: 69 What are the Session State Modes? Define each

    Session State mode supported by ASP.NET.

    Ans:

    ASP.NET supports three Session State modes.1. InProc:This mode stores the session data in the ASP.NET workerprocess and fastest among all of the storage modes.Its Also effectsperformance if the amount of data to be stored is large.2. State Server:This mode maintained on a different system andsession state is serialized and stored in memory in a separate

    process.State Server mode is serialization and de-serialization of objects.State Server mode is slower than InProc mode as this stores data in

    an external process.3. SQL Server:This mode can be used in the web farms and reliableand secures storage of a session state.In this storage mode, theSession data is serialized and stored in a database table in the SQLServer database.

  • 7/31/2019 .Net Questions and Answers

    16/73

    Ques: 70 Disadvantages of using Session State ?

    Ans:

    Disadvatages:

    1. It is not advisable to use session state when working with largesum of data.Because Data in session state is stored in servermemory.2. Too many variables in the memory effect performance. Becausesession state variable stays in memory until you destroy it.Ques: 71 Advantages of using Session State?

    Ans:

    Advantages:

    1. It is easy to implement.2. Ensures platform scalability,works in the multi-processconfiguration.3. Ensures data durability, since session state retains data even ifASP.NET work process restarts as data in Session State is stored inother process space.Ques: 72 What is the Session Identifier?

    Ans:

    Session Identifier is :1. To identify session.2. It has SessionID property.3. When a page is requested, browser sends a cookie with a sessionidentifier.4. Session identifier is used by the web server to determine if it

    belongs to an existing session or not. If not, then Session ID isgenerated by the web server and sent along with the response.Ques: 73 What is SessionID?

    Ans:To identify the request from the browser used sessionID. SessionIdvalue stored in a cookie. Configure the application to storeSessionId in the URL for a "cookieless" session.Ques: 74 Describe Server Side State Management ?

    Ans:

  • 7/31/2019 .Net Questions and Answers

    17/73

    Sever side state managment provied Better security,Reducedbandwidth.1. Application State: This State information is available to all pages,regardless of which user requests a page.

    2. Session State Session State information is available to all pagesopened by a user during a single visit.Ques: 75 Discribe Client Side State Management?

    Ans:

    Client side state managment have:a. Stores information on the client's computer by embedding theinformation into a Web page.

    b. A uniform resource locator(url).

    c. Cookie.To store the state information at the client end terms are:1. View State:It is used by the Asp.net page framework toautomatically save the values of the page and of each control just

    prior to rendering to the page.Asp.Net uses View State to track thevalues in the Controls. You can add custom values to the view state.2. Control State:When user create a custom control that requiresview state to work properly, you should use control state to ensure

    other developers dont break your control by disabling view state.3. Hidden fields:Like view state, hidden fields store data in anHTML form without displaying it in the user's browser. The data isavailable only when the form is processed.4. Cookies: Cookies store a value in the user's browser that the

    browser sends with every page request to the same server. Cookiesare the best way to store state data that must be available formultiple Web pages on a web site.5. Query Strings: Query strings store values in the URL that are

    visible to the user. Use query strings when you want a user to beable to e-mail or instant message state data with a URL.

    Ques: 76 What is Authentication and Authorization ?

    Ans:

    An authentication system is how you identify yourself to the

  • 7/31/2019 .Net Questions and Answers

    18/73

    computer. The goal behind an authentication system is to verify thatthe user is actually who they say they are.Once the system knows who the user is through authentication,authorization is how the system decides what the user can do.

    Ques: 77 Define State managment?Ans:

    This is passible to at a time many request occures.State managementis the process by which maintained state and page information overmultiple requests for the same or different pages.Two types of State Managment:1. Client side state managment:This stores information on theclient's computer by embedding the information into a Web

    page,uniform resource locator(url), or a cookie.2. Server side state managment: There are two state ApplicationState,Session State.Ques: 78 What are the different states in ASP.NET?

    Ans:

    There are three types of state:1. View state: Under the client-side state managment.The ViewState

    property provides a dictionary object for retaining values between

    multiple requests for the same page. When an ASP.NET page isprocessed, the current state of the page and controls is hashed into astring and saved in the page as a hidden field.2. Application state:Under the server side state managment.ASP.NET allows you to save values using application state, a globalstorage mechanism that is accessible from all pages in the Webapplication. Application state is stored in the Application key/valuedictionary.3. Session state:Under server side state managment . ASP.NET

    allows you to save values using session state, a storage mechanismthat is accessible from all pages requested by a single Web browsersession.Ques: 79 Whether we can use vbscript and javascript

    combination for validation?

    Ans:

  • 7/31/2019 .Net Questions and Answers

    19/73

  • 7/31/2019 .Net Questions and Answers

    20/73

    new session.while adding this Global.asax file to our application by default itcontains five methods,Those methods are:

    1.Application_Start.2.Application_End.3.Session_Start.4.Session_End.5.Application_Error.Ques: 83 What is the Default Expiration Period For Session

    and Cookies,and maximum size of viewstate?

    Ans:

    The default Expiration Period for Session is 20 minutes.The default Expiration Period for Cookie is 30 minutes.The maximum size of the viewstate is 25% of the page sizeQues: 84 Difference between Session object and Profile object

    in ASP.NET?

    Ans:

    Profile object:1. Profile object is persistent.

    2. Its uses the provider model to store information.3. Strongly typed4. Anonymous users used mostly.

    Session object:1. Session object is non-persistant.2. Session object uses the In Proc, Out Of Process or SQL ServerMode to store information.3. Not strongly typed.

    4. Only allowed for authenticated users.Ques: 85 What are the two levels of variable supported by Asp.net?Ans:

    1. Page level variable:String ,int ,float.2. Object level variable:Session level, Application level.Ques: 86 Explain the aim of using EnableViewState property?

  • 7/31/2019 .Net Questions and Answers

    21/73

    Ans:

    When the page is posted back to the server, the server control isrecreated with the state stored in viewstate.It allows the page to savethe users input on a form across postbacks. It saves all the server

    side values for a given control into ViewState, which is stored as ahidden value on the page before sending the page to the clients

    browser.Ques: 87 Why the exception handling is important for an

    application?

    Ans:

    Exception handling prevents the unusual error in the asp.netapplication,when apllication executed.If the exceptions are handled

    properly, the application will never get terminated abruptly.Ques: 88 Define Error Events in Asp.Net?

    Ans:

    In ASP.Net when any unhandled exception accurs in applicationthen an event occures,that event called Error event.Two types ofEvent:1. Page_Error:When exception occures in a page then this eventraised.

    2. Application_error:Application_Error event raised whenunhandled exceptions in the ASP.NET application and isimplemented in global.asax.

    The error event have two method:1. GetLastError: Returns the last exception that occurred on theserver.2. ClearError: This method clear error and thus stop the error totrigger subsequent error event.

    Ques: 89 How to create Multivalued Cookie ?

    Ans:

  • 7/31/2019 .Net Questions and Answers

    22/73

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    void btnSubmit_Click(Object s, EventArgs e)

    {Response.Cookies["preferences"]["firstName"] =

    txtFirstName.Text;Response.Cookies["preferences"]["lastName"] =

    txtLastName.Text;Response.Cookies["preferences"]["favoriteColor"] =

    txtFavoriteColor.Text;Response.Cookies["preferences"].Expires =

    DateTime.MaxValue;}

    Set Cookie Values




  • 7/31/2019 .Net Questions and Answers

    23/73

    Text="Last Name:"AssociatedControlID="txtFirstName"Runat="server" />







    Ques: 90 How do you require authentication using theWeb.config file?

    Ans:

    Include the following &ltauthorization> element to requireauthentication:

  • 7/31/2019 .Net Questions and Answers

    24/73

    Ques: 91 What is the difference between web.config and

    Machine.config files?Ans:

    1. Usually on a webserver there is only one Machine.config filewhereas in a web application there is no of files,but in the rootdirectory.2. Web.config file settings will override machine.config settings.3. Machine.config file specifies configuration settings for all of thewebsites on the web server.Web.config file specify configuration

    settings for a particular web application, and is located in theapplications root directory .Ques: 92 What is the main difference between the Button servercontrol and the Button HTML control?Ans:

    The Button HTML control triggers the event procedure indicated inthe buttons onclick attribute, which runs on the client.When clicked, the Button server control triggers an ASP.NET Click

    event procedure on the server.Ques: 93 Differences between Web and Windows applications?Ans:

    Web Forms:Web forms use server controls, HTML controls, usercontrols, or custom controls created specially for Web forms.Webapplications are displayed in a browser.Web forms are instantiatedon the server, sent to the browser, and destroyed immediately.Windows Forms:Windows forms are instantiated, exist for as longas needed, and are destroyed. Windows applications run on the same

    machine they are displayed on.Windows applications display theirown windows and have more control over how those windows aredisplayed.Ques: 94 Describe the property of cookie in Asp.Net ?

    Ans:

  • 7/31/2019 .Net Questions and Answers

    25/73

    Properties:1. Domain: The domain associated with the cookie for example,aspx.superexpert.com2. Expires: The expiration date for a persistent cookie.

    3. HasKeys: A Boolean value that indicates whether the cookie is acookie dictionary.4. Name: The name of the cookie.5. Path: The path associated with the Cookie. The default value is /.6. Secure: A value that indicates whether the cookie should be sentover an encrypted connection only. The default value is False.7. Value: The value of the Cookie.8. Values: A NameValueCollection that represents all the key and

    value pairs stored in a Cookie dictionary.

    Ques: 95 Write the code that creates a cookie containing the

    user name R4R and the current date to the user computer. Set

    the cookie to remain on the user computer for 30 days?

    Ans:

    Code:

    HttpCookie cookUserInfo = new HttpCookie("UserInfo");CookUserInfo["Name"] = "R4R";CookUserInfo["Time"] = DateTime.Now.ToString();cookUserInfo.Expires = DateTime.Now.AddDays(30);Response.Cookies.Add(cookUserInfo);

    Description:"HttpCookie" :The HttpCookie class is under System.Webnamespace.

    "CookUserInfo" :is the object of class HttpCookie"Expires": is the property that sets the duration,when cookie expire.Ques: 96 What do you mean by three-tier architecture?

    Ans:

    The three-tier architecture was improve management of code and

  • 7/31/2019 .Net Questions and Answers

    26/73

    contents and to improve the performance of the web basedapplications. There are mainly three layers in three-tierarchitecture.This architecture remove the many drawbacks of

    previous Cliet-Server architecture.

    There are three stages in this Architecture;(1)Presentation Layer: PL(Presentation Layer) Contains only clientside scripting like HTML, javascript and VB script etc.The inputValidation validate on Cliet side.(2)Business Logic Layer:BL(Business Logic Layer) contain theserver side code for data transaction, query and communicatethrough Data Base,and Pass the data to the user interface.(3)Database layer:Data Layer represents the data store like MS

    Access, SQL Server, an XML file, an Excel file or even a text filecontaining data also some additional database are also added to thatlayers.Ques: 97 Define ASP.Net page life cycle in brief ?

    Ans:

    1. OnInit (Init): Initializes each child control.2. LoadControlState: Loaded the ControlState of the control. To usethis method the control must call the

    Page.RegisterRequiresControlState method in the OnInit method ofthe control.3. LoadViewState: Loaded the ViewState of the control.4. LoadPostData: Controls that implement this interface use thismethod to retrieve the incoming form data and update the controlAccording to there properties.5. Load (OnLoad): Allows actions that are common to every requestto be placed here. control is stable at this time, it has been initializedand its state has been reconstructed.

    6. RaisePostDataChangedEvent: Is defined on the interfaceIPostBackData-Handler.7. RaisePostbackEvent: Handling the clien side event causedPostback to occur8. PreRender (OnPreRender): Allows last-minute changes to thecontrol. This event takes place before saving ViewState so any

  • 7/31/2019 .Net Questions and Answers

    27/73

    changes made here are saved.9. SaveControlState: Saves the current control state to ViewState.10. SaveViewState: Saves the current data state of the control toViewState.

    11. Render: Generates the client-side HTML Dynamic HypertextMarkup Language (DHTML) and script that are necessary to

    properly display this control at the browser. In this stage anychanges to the control are not persisted intoViewState.12. Dispose: Accepts cleanup code. Releases any unman-agedresources in this stage. Unmanaged resources are resources that arenot handled by the .NET common language runtime such as file

    handles and database connections.13. UnLoad

    Ques: 98 What is ViewState?

    Ans:

    State of the object to be stored in hidden field on the page.ViewStateis not stored on the server or any other external source. ViewStatetransported to the client and back to the server. ViewState is used

    the retain the state of server-side objects betweenpostabacks.Viewstate should be the first choice to save data toaccess across postbacks.

    Ques: 99 What classes are needed to send e-mail from an

    ASP.NET application?

    Ans:Following Classes use to sent email from ASP.Net application:1.MailMessage2.SmtpMailBoth are classes defined in the .NET Framework Class Library's"System. Web. Mail" namespace.

  • 7/31/2019 .Net Questions and Answers

    28/73

    Ques: 100 Do Web controls support Cascading Style Sheets?

    Ans:

    All Web controls inherit a property named CssClass from the baseclass "System.Web.UI. WebControls. WebControl" which can beused to control the properties of the web control.

    Page 6

    Ques: 101 What is Data Binding?

    Ans:

    Data Binding is binding controls to data from databases.Using Databinding a control to a particular column in a table from the databaseor we can bind the whole table to the data grid.

    In other words Data binding is a way used to connect valuesfrom a collection of data (e.g. DataSet) to the controls on a webform. The values from the dataset are automatically displayed in

    the controls without having to write separate code to display them.Ques: 102 What is the difference between Server.Transfer and

    Response.Redirect?

    Ans:

    Response.Redirect:This tells the browser that the requested page canbe found at a new location. The browser then initiates anotherrequest to the new page loading its contents in the browser.

    Server.Transfer: It transfers execution from the first page to thesecond page on the server. As far as the browser client is concerned,it made one request and the initial page is the one responding withcontent. The benefit of this approach is one less round trip to theserver from the client browser.Ques: 103 Describe Paging in ASP.NET?

  • 7/31/2019 .Net Questions and Answers

    29/73

    Ans:

    "In computer operating systems there are various ways in which theoperating system can store and retrieve data from secondary storage

    for use in main memory". One such memory management scheme isreferred to as paging.In ASP.Net the DataGrid control in ASP.NETenables easy paging of the data. The AllowPaging property of theDataGrid can be set to True to perform paging. ASP.NETautomatically performs paging and provides the hyperlinks to theother pages in different styles, based on the property that has beenset for PagerStyle.Mode.Ques: 104 What is the ASP.NET validation controls?

    Ans:

    Validation controls applied on client side scripting.List ofValidations:1. RequiredFieldValidator:Makes a input control to required field.2. RangeValidator:Chek the values falls between to values.3. CompareValidator:Compares the value of one input control to thevalue of another input control or to a fixed value.

    4. RegularExpressionValidator:Input value matches a specificpattern.5. CustomValidator:Write a Method to validat input.6. ValidationSummary:Displays a report of all validation errorsoccurred in a Web page.Ques: 105 Explain the differences between server-side and

    client-side code in Asp.Net?

    Ans:

    In Asp.Net Environment Server side code or scripting means thescript will executed by server as interpreted needed.Server sidescripting done the bussines logic like transaction and fetching datato Sever.

    Client side scripting means that the script will be executedimmediately in the browser such as form field validation, clock,

  • 7/31/2019 .Net Questions and Answers

    30/73

    email validation, etc. Client side scripting is usually done inVBScript or JavaScript. Since the code is included in the HTML

    page, anyone can see the code by viewing the page source.Ques: 106 What is Postback in Asp.net?

    Ans:

    When Frist time reqest to the server PostBack is False.When requestor an action occurs (like button click), the page containing all thecontrols within the tag performs an HTTP POST, whilehaving itself as the target URL. This is called Postback.We can sayits a mechanism to allow the communication between client side and

    server side.Ques: 107 Explain Web Services?

    Ans:

    Web services are programmable business logic components thatprovide access to functionality through the Internet. Web servicesare given the .asmx extension.Standard protocols like HTTP can be

    used to access them. Web services are based on the Simple ObjectAccess Protocol (SOAP), which is an application of XML.In .NetFrameWork Web services convert your application in to WebApplication.which published their functionality to whole world oninternet.Web Services like a software system that designed tosupport interoperable machine-to-machine interaction over aInternet.Ques: 108 What is Shallow Copy and Deep Copy in .NET?

    Ans:

    Shallow copy:When a object creating and copying nonstatic field ofthe current object to the new object know as shallow copy.If a field is a value type --> a bit-by-bit copy of the field is

    performeda reference type --> the reference is copied but the referred object isnot; therefore, the original object and its clone refer to the same

  • 7/31/2019 .Net Questions and Answers

    31/73

    object.

    Deep copy:Deep cooy little same as shallow copy,deep copy thewhole object and make a different object, it means it do not refer to

    the original object while in case of shallow copy the target objectalways refer to the original object and changes in target object alsomake changes in original object.Ques: 109 What is CLR?

    Ans:

    CLR(Common Language Runtime) provide Environment to debuggand run program and utility developed at the .Net FrameWork.CLR

    provide memory management, debugging, security, etc. The CLR is

    also known as Virtual Execution System (VES). The managed andunmanaged code both runs under CLR.Unmanaged code runthrough the Wrapered Classes.There are many system Utilities rununder the CLR.

    Ques: 110 Explain Namespace ?

    Ans:There are many classes in Asp.Net.If Microsoft simply jumbled allthe classes together, then you would never find anything. Microsoftdivided the classes in the Framework into separate namespaces.Allclasses working with a file system located in Systen.Io Namespace.All classes working with SQL data base used System.Data.SqlClient

    Namespace.The ASP.NET Framework gives you the most commonly usednamespaces:

    . System

    . System.Collections

    . System.Collections.Specialized

    . System.Configuration

    . System.Text

    . System.Text.RegularExpressions

  • 7/31/2019 .Net Questions and Answers

    32/73

    . System.Web

    . System.Web.Caching

    . System.Web.SessionState

    . System.Web.Security

    . System.Web.Profile

    . System.Web.UI

    . System.Web.UI.WebControls

    . System.Web.UI.WebControls.WebParts

    . System.Web.UI.HTMLControlsQues: 111 What are the advantages and disadvantage of Using

    Cookies?

    Ans:

    Advantage:1.Cookies do not require any server resources since they are storedon the client.2. Cookies are easy to implement.3. Cookies to expire when the browser session ends (sessioncookies) or they can exist for a specified length of time on thecomputer (persistent cookies).

    Disadvantage:1. Users can delete a cookies.2. Users browser can refuse cookies,so your code has to anticipatethat possibility.3. Cookies exist as plain text on the client machine and they maysecurity risk as anyone can open and tamper with cookies.Ques: 112 What is the difference between Session Cookies and

    Persistent Cookies?

    Ans:

    When client broweses session cookie stored in a memmory.whenbrowser closed session cookie lost.//Code to create a UserName cookie containing the name David.HttpCookie CookieObject = new HttpCookie("UserName","David");Response.Cookies.Add(CookieObject);

  • 7/31/2019 .Net Questions and Answers

    33/73

    //Code to read the Cookie created aboveRequest.Cookies["UserName"].Value;

    Persistent cookie same as the session cookie except that persistentcookie have expiration date.The expiration date indicates to the

    browser that it should write the cookie to the client's hard drive.//Code to create a UserName Persistent Cookie that lives for 10 daysHttpCookie CookieObject = new HttpCookie("UserName","David");CookieObject.Expires = DateTime.Now.AddDays(10);Response.Cookies.Add(CookieObject);

    //Code to read the Cookie created aboveRequest.Cookies["UserName"].Value;Ques: 113 What are the steps to host a web application on a

    web server?

    Ans:

    Step1.Set up a virtual folder for the application using IIS.2. Copy the Web application to the virtual directory.

    3. Adding the shared .NET components to the servers globalassembly cache (GAC).4. Set the security permissions on the server to allow the applicationto access required resources.Ques: 114 What happens when you make changes to an

    applications Web.config file?

    Ans:

    When make change in web.config file.IIS restarts application andautomatically applies changes.This effect the Session state variable

    and effect the application,then user adversely affected.Ques: 115 What is Globalization ?

    Ans:

    The process to make a Application according to the user frommultiple culture.The process involves translating the user interfacein to many languages,like using the correct currency, date and time

  • 7/31/2019 .Net Questions and Answers

    34/73

    format, calendar, writing direction, sorting rules, and otherissues.Accommodating these cultural differences for an applicationis called Globlization.Three different ways to globalize web applications:

    1.Detect and redirect approach2.Run-time adjustment approach3.Satellite assemblies approachQues: 116 What is the Difference between Compiler and

    Translator?

    Ans:

    Compiler converet the program one computer language to anothercomputer language.in other word high level language to low level

    language.Traslator traslate one language to many other language like englishto hindi,french etc.Ques: 117 What is the Difference Between Compiler and

    Debugger ?

    Ans:

    Compiler is a software or set of soetware that translate one computerLanguage to another computer.Most cases High level Programming

    Language to low level Programming Language.Most of the time Program analyzed and examined error thenDebugger used.Debugger is another program that is used for testingand debugging purpose of other programs. It will be able to tellwhere exactly in your application error occurred,and tell the whereerror occured.Ans:

    Compiler is a software or set of software that translate one computerLanguage to another computer.Most cases High level Programming

    Language to low level Programming Language. Most of the timeProgram analyzed and examined error then Debuggerused.Debugger is another program that is used for testing anddebugging purpose of other programs. It will be able to tell whereexactly in your application error occurred,and tell the where erroroccurred

  • 7/31/2019 .Net Questions and Answers

    35/73

    Ans:

    Compiler is a software or set of software that translate one computerLanguage to another computer.Most cases High level ProgrammingLanguage to low level Programming Language. Most of the time

    Program analyzed and examined error then Debuggerused.Debugger is another program that is used for testing anddebugging purpose of other programs. It will be able to tell whereexactly in your application error occurred,and tell the where erroroccurred

    NOQues: 118 Types of Debbuger ?

    Ans:

    Debugger is another program that is used for testing and debuggingpurpose of other programs. Most of the time it is using to analyzeand examine error conditions in application. It will be able to tellwhere exactly in your application error occurred,Two Types of Debbuger:1.CorDBG command-line debugger. To use CorDbg, you mustcompile the original C# file using the /debug switch.2.DbgCLR graphic debugger. Visual Studio .NET uses the

    DbgCLR.Ques: 119 Difference between Cookies and Session inAsp.Net ?

    Ans:

    1.The main difference between cookies and sessions is that cookiesare stored in the user's browser, and sessions are not. This differencedetermines what each is best used for.2.A cookie can keep information in the user's browser until deleted.

    If a person has a login and password, this can be set as a cookie intheir browser so they do not have to re-login to your website everytime they visit. You can store almost anything in a browser cookie3. Sessions are not reliant on the user allowing a cookie. They workinstead like a token allowing access and passing information whilethe user has their browser open. The problem with sessions is that

  • 7/31/2019 .Net Questions and Answers

    36/73

    when you close your browser you also lose the session. So, if youhad a site requiring a login, this couldn't be saved as a session like itcould as a cookie, and the user would be forced to re-login everytime they visit.

    Ans:1.The main difference between cookies and sessions is that cookiesare stored in the user's browser, and sessions are not. This differencedetermines what each is best used for.2.A cookie can keep information in the user's browser until deleted.If a person has a login and password, this can be set as a cookie intheir browser so they do not have to re-login to your website everytime they visit. You can store almost anything in a browser cookie

    3. Sessions are not reliant on the user allowing a cookie. They workinstead like a token allowing access and passing information whilethe user has their browser open. The problem with sessions is thatwhen you close your browser you also lose the session. So, if youhad a site requiring a login, this couldn't be saved as a session like itcould as a cookie, and the user would be forced to re-login everytime they visit.Ques: 120 What is the structure of ASP.Net Pages ?

    Ans:1.Directives:A directive controls how an ASP.NET page iscompiled. The beginning of a directive is marked with the characters. Adirective can appear anywhere within a page.A directive typicallyappears at the top of an ASP.NET page.2.Code declaration block:A code declaration block contains all theapplication logic for your ASP.NET page and all the global variabledeclarations, subroutines, and functions. It must appear within a

    tag.3.ASP.Net Controls:ASP.NET controls can be freely interspersedwith the text and HTML content of a page. The only requirement isthat the controls should appear within a tag. And, for certain tags such as and, this requirement can be ignored

  • 7/31/2019 .Net Questions and Answers

    37/73

    without any dire consequences.4.Code Render Blocks:If you need to execute code within theHTML or text content of your ASP.NET page, you can do so withincode render blocks. The two types of code render blocks are inline

    code and inline expressions. Inline code executes a statement orseries of statements. This type of code begins with the characters .5.Server side comments:You can add comments to your ASP.NET

    pages by using server-side comment blocks. The beginning of aserver-side comment is marked with the characters .6.Server side include Directives:You can include a file in an

    ASP.NET page by using one of the two forms of the server-sideinclude directive. If you want to include a file that is located in thesame directory or in a subdirectory of the page including the file,you would use the following directive:7.Literal text and html Tags:The final type of element that you caninclude in an ASP.NET page is HTML content. The static portion ofyour page is built with plain old HTML tags and text.

    Page 7

    Ques: 121 Define File Name Extensions In Asp .net ?

    Ans:

    Applications written in Asp .net have different files with differentextension. native files generally have .aspx or .ascx extension . Web

    services have .asmx extension.File name containing the business logic depend on the language thatyou are using. For Example a c# file have extension aspx.cs.Ques: 122 What is ASp.net ?

    Ans:

    ASP .NET built on .net framework. Asp .net is a web development

  • 7/31/2019 .Net Questions and Answers

    38/73

    tool. Asp .net is offered by Microsoft. We can built dynamicwebsites by using asp .net. Asp .net was first released in January2002 with version 1.0 of the .net framework. It is the successor ofMicrosoft's ASP. .NET Framework consists of many class libraries,

    support multiple languages and a common execution platform.Asp .net is a program run in IIS server. Asp .net is also called Asp+.Every element in Asp .net is treated as object and run on server. Asp.net is a event driven programming language. Most html tags areused by Asp .net. Asp .net allows the developer to build applicationsfaster. Asp .net is a server side scripting.Ques: 123 ASP.net Versions ?

    Ans:ASP .NET version 1.0 was first released in January 2002ASP .NET version 1.1 released in April 2003 (ASP .NET 2003)ASP .NET version 2.0 released in November 2005 (ASP .NET2005)ASP .NET version 3.5 released in November 2007 (ASP .NET2008)Ques: 124 Difference bt ASP and asp.net?

    Ans:

    1.Asp .net is compiled while asp is interpreted.2.ASP is mostly written using VB Script and HTML. while asp .netcan be written in C#, J# and VB etc.3.Asp .net have 4 built in classes session , application , requestresponse, while asp .net have more than 2000 built in classes.4.ASP does not have any server side components whereas Asp .nethave server side components such as Button , Text Box etc.

    5.Asp does not have page level transaction while Asp .net have pagelevel transaction.ASP .NET pages only support one language on a single page, whileAsp support multiple language on a single page.6.Page functions must be declared as in ASP.net . While in Asp page function is declared as .

  • 7/31/2019 .Net Questions and Answers

    39/73

    Ques: 125 What is the difference between an EXE and a DLL?

    Ans:

    DLL:Its a Dynamic Link Library .There are many entry points. Thesystem loads a DLL into the context of an existing thread. Dll

    cannot Run on its ownEXE:Exe Can Run On its own.exe is a executable file.When asystem launches new exe, a new process is created.The entry threadis called in context of main thread of that process.Ques: 126 Difference Between Thread and Processs?

    Ans:

    Process is a program in execution where thread is a seprate part ofexecution in the program.Thread is a part of process. process is the collection of thread.Ques: 127 How does cookies work in ASP.Net?

    Ans:

    Using Cookies in web pages is very useful for temporarily storingsmall amounts of data, for the website to use. These Cookies aresmall text files that are stored on the user's computer, which the web

    site can read for information; a web site can also write new cookies.An example of using cookies efficiently would be for a web site totell if a user has already logged in. The login information can bestored in a cookie on the user's computer and read at any time by theweb site to see if the user is currently logged in. This enables theweb site to display information based upon the user's current status -logged in or logged out.Ques: 128 What is ASP.Net?

    Ans:

    ASP Stands for Active server Pages.ASP used to create interactingweb pages.Ques: 129 What is Benefits of ASP.NET?

    Ans:

    >>Simplified development:ASP.NET offers a very rich object model that developers can use to

  • 7/31/2019 .Net Questions and Answers

    40/73

    reduce the amount of code they need to write.

    >>Web services:Create Web services that can be consumed by any client that

    understands HTTP andXML, the de facto language for inter-device communication.

    >>Performance:When ASP.NET page is first requested, it is compiled and cached,or saved in memory, bythe .NET Common Language Runtime (CLR). This cached copy canthen be re-used for

    each subsequent request for the page. Performance is therebyimproved because afterthe first request, the code can run from a much faster compiledversion.

    >>Language independence

    >>Simplified deployment

    >>Cross-client capabilityQues: 130 How to create voting poll system in asp.net which allowsuser to see the results?Ques: 131 How to make User Control in ASP.net?

    Ans:

    a)Add User Controllwrite code:-

    BigBanyanTree.com

  • 7/31/2019 .Net Questions and Answers

    41/73

    b)In .aspx page:-

    c)Now use this :-

    Ques: 132 Write a program to show the Use of dataList in

    ASP.NET?Ans:

    Employee Detailed

    Ques: 133 How to show data in HTML table using Repeater?Ans:

    Empno Ename Sal

  • 7/31/2019 .Net Questions and Answers

    42/73

    Ans:

    dfdQues: 134 How Repeater is used in ASP.NET?

    Ans:

  • 7/31/2019 .Net Questions and Answers

    43/73

    //the whole structure looks like thisEmployee Detailed

    Thanks

  • 7/31/2019 .Net Questions and Answers

    44/73

    Ques: 135 Write a Program to Connect with dropdownlist in

    ASP.NETAns:

    OleDbConnection x;OleDbDataAdapter y;DataSet z;protected void Button1_Click(object sender, EventArgs e){

    x = new OleDbConnection("Provider=msdaora;user

    id=scott;password=tiger");x.Open();y=new OleDbDataAdapter("select * from emp",x);z = new DataSet();y.Fill(z, "emp");DropDownList1.DataSource = z;DropDownList1.DataTextField = "ename";DropDownList1.DataBind();

    x.Close();

    }

    Ques: 136 Write a program to show data in Gridview in

    ASP.NET?

    Ans:

    OleDbConnection x;OleDbDataAdapter y;

    DataSet z;protected void Button2_Click(object sender, EventArgs e){

    x = new OleDbConnection("provider=msdaora;userid=scott;password=tiger");

    x.Open();

  • 7/31/2019 .Net Questions and Answers

    45/73

    y = new OleDbDataAdapter("select * from emp", x);z = new DataSet();y.Fill(z, "emp");GridView1.DataSource = z.Tables["emp"];

    GridView1.DataBind();y.Dispose();x.Close();

    }

    Ques: 137 Write a program to Delete Record in ASP.NET ?

    Ans:

    OleDbConnection x;OleDbCommand y;protected void Button1_Click(object sender, EventArgs e){

    x = newOleDbConnection("provider=microsoft.jet.oledb.4.0;datasource=c:\\db1.mdb");

    x.Open();

    y = new OleDbCommand("delete from emp whereempno=@p",x);y.Parameters.Add("@p", TextBox1.Text);y.ExecuteNonQuery();Label1.Visible = true;Label1.Text="Record Deleted";y.Dispose();x.Close();

    }

    Ques: 138 How to add Record in ASP.NET?

    Ans:

    OleDbConnection x;OleDbCommand y;

  • 7/31/2019 .Net Questions and Answers

    46/73

    protected void Button1_Click(object sender, EventArgs e){

    x = newOleDbConnection("provider=microsoft.jet.oledb.4.0;data

    source=c:\\db1.mdb");x.Open();y = new OleDbCommand("Insert into emp(empno,ename,sal)

    values(@p,@q,@r)", x);y.Parameters.Add("@p", TextBox1.Text);y.Parameters.Add("@q", TextBox2.Text);y.Parameters.Add("@r", TextBox3.Text);y.ExecuteNonQuery();

    Label1.Visible = true;Label1.Text="Record Addedd";y.Dispose();x.Close();

    }

    Ans:

    OleDbConnection x;

    OleDbCommand y;protected void Button1_Click(object sender, EventArgs e){

    x = newOleDbConnection("provider=microsoft.jet.oledb.4.0;datasource=c:\\db1.mdb");

    x.Open();y = new OleDbCommand("Insert into emp(empno,ename,sal)

    values(@p,@q,@r)", x);

    y.Parameters.Add("@p", TextBox1.Text);y.Parameters.Add("@q", TextBox2.Text);y.Parameters.Add("@r", TextBox3.Text);y.ExecuteNonQuery();Label1.Visible = true;Label1.Text="Record Addedd";

  • 7/31/2019 .Net Questions and Answers

    47/73

    y.Dispose();x.Close();

    }

    Ques: 139Write a program to show connection to Excel in ASP.NET?

    Ans:

    OleDbConnection x;OleDbCommand y;OleDbDataReader z;protected void Page_Load(object sender, EventArgs e){

    x = newOleDbConnection("provider=microsoft.jet.oledb.4.0;datasource=c:\\book1.xls;Extended Properties=excel 8.0");

    x.Open();y = new OleDbCommand("select * from [sheet1$]", x);z = y.ExecuteReader();while (z.Read()){

    Response.Write("");Response.Write(z["ename"]);}z.Close();y.Dispose();x.Close();

    }Ques: 140

    Write a program to show connection with Oracle in

    ASP.NET?Ans:

    OleDbConnection x;OleDbCommand y;OleDbDataReader z;protected void Page_Load(object sender, EventArgs e)

  • 7/31/2019 .Net Questions and Answers

    48/73

    {x = new OleDbConnection("provider=msdaora;user

    id=scott;password=tiger");x.Open();

    y = new OleDbCommand("select * from emp", x);z = y.ExecuteReader();while (z.Read()){

    Response.Write("");Response.Write(z["ename"]);

    }z.Close();

    y.Dispose();x.Close();

    }

    Page 8

    Ques: 141 Write a program in ASP.NET to Show Data With

    Access?

    Ans:Page_Load():-

    OleDbConnection x;OleDbCommand y;OleDbDataReader z;protected void Page_Load(object sender, EventArgs e){

    x = newOleDbConnection("provider=microsoft.jet.oledb.4.0;datasource=c:\\db1.mdb");

    x.Open();y = new OleDbCommand("select * from emp", x);z = y.ExecuteReader();while (z.Read())

  • 7/31/2019 .Net Questions and Answers

    49/73

    {Response.Write(z["ename"]);Response.Write("");

    }

    z.Close();y.Dispose();x.Close();

    }

    Ques: 142 Define Life Cycle of Page in ASP.NET?

    Ans:

    protected void Page_PreLoad(object sender, EventArgs e)

    {Response.Write("
    "+"Page Pre Load");

    }protected void Page_Load(object sender, EventArgs e){

    Response.Write("
    " + "Page Load");}protected void Page_LoadComplete(object sender, EventArgs e)

    { Response.Write("
    " + "Page Complete");}protected void Page_PreRender(object sender, EventArgs e){

    Response.Write("
    " + "Page Pre Render");}protected void Page_Render(object sender, EventArgs e){

    Response.Write("
    " + "Pre Render");}protected void Page_PreInit(object sender, EventArgs e){

    Response.Write("
    " + "Page Pre Init");}

  • 7/31/2019 .Net Questions and Answers

    50/73

    protected void Page_Init(object sender, EventArgs e){

    Response.Write("
    " + "Page Init");}

    protected void Page_InitComplete(object sender, EventArgs e){

    Response.Write("
    " + "Page Pre Init Complete");}

    Ques: 143 DescribeWizard server control with example in

    Share Point?

    Ans:

    This control enables you to build a sequence of steps that are

    displayed to theend users side. It is alos used either display or gather information insmall steps in system.

    using System;using System.Collections.Generic;using System.Text;

    using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using Microsoft.SharePoint.WebPartPages;namespace LoisAndClark.WPLibrary{

    public class MyWP : WebPart{

    protected override void CreateChildControls(){

    Wizard objWizard = new Wizard();objWizard.HeaderText = "Wizard Header";for (int i = 1; i

  • 7/31/2019 .Net Questions and Answers

    51/73

    objStep.Title = "Step " + i;TextBox objText = new TextBox();objText.ID = "Text" + i;objText.Text = "Value for step " + i;

    objStep.Controls.Add(objText);objWizard.WizardSteps.Add(objStep);}this.Controls.Add(objWizard);}}}

    Ques: 144What is BulletedList Control in Share Point. Give an

    example?

    Ans:

    Bullet style allow u choose the style of the element that precedes theitem.here u can choose numbers, squares, or circles.here child itemscan be rendered as plain text, hyperlinks, or buttons.This example uses a custom image that requires to be placed in a

    virtual directory on the server.using System;using System.Collections.Generic;using System.Text;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using Microsoft.SharePoint.WebPartPages;namespace LoisAndClark.WPLibrary{

    public class MyWP : WebPart{

    protected override void CreateChildControls{BulletedList objBullist = new BulletedList();objBullist.BulletStyle = BulletStyle.CustomImage;

  • 7/31/2019 .Net Questions and Answers

    52/73

    objBullist.BulletImageUrl = @"/_layouts/images/rajesh.gif";objBullist.Items.Add("First");objBullist.Items.Add("Seciond");objBullist.Items.Add("Third");

    objBullist.Items.Add("Fourth");this.Controls.Add(objBullist);}}}

    Ques: 145 How to create a SharePoint web part using File

    upload control.give example?

    Ans:using System;using System.Collections.Generic;using System.Text;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using Microsoft.SharePoint.WebPartPages;namespace LoisAndClark.WPLibrary

    {public class MYWP : WebPart{FileUpload objFileUpload = new FileUpload();

    protected override void CreateChildControls(){this.Controls.Add(new System.Web.UI.LiteralControl("Select a file to upload:"));this.Controls.Add(objFileUpload);

    Button btnUpload = new Button();btnUpload.Text = "Save File";this.Load += new System.EventHandler(btnUpload_Click);this.Controls.Add(btnUpload);}

    private void btnUpload_Click(object sender, EventArgs e)

  • 7/31/2019 .Net Questions and Answers

    53/73

    {string strSavePath = @"C:\temp\";if (objFileUpload.HasFile){

    string strFileName = objFileUpload.FileName;strSavePath += strFileName;objFileUpload.SaveAs(strSavePath);}else{//otherwise let the message show file was not uploaded.}

    }}}

    Ques: 146 Print Hello World message using SharePoint in

    Asp.Net 2.0?

    Ans:

    using System;

    using System.Collections.Generic;using System.Text;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using Microsoft.SharePoint.WebPartPages;namespace LoisAndClark.WPLibrary{

    public class MYWP : WebPart{

    protected override void CreateChildControls(){Content obj = new Content();string str1 = obj.MyContent("Hello World!");this.Controls.Add(new System.Web.UI.LiteralControl(str1));}

  • 7/31/2019 .Net Questions and Answers

    54/73

    }}generic method shows that SharePoint site is running on .NETFramework

    2.0, and the code of the generic method seems like this:public string MyContent(MyType arg){return arg.ToString();}

    Ques: 147 How to Configure SMTP in asp .NET?

    Ans:

    This example specifies SMTP parameters to send e-mail using aremote SMTP server and user that are importent. This programshows configuration process-

  • 7/31/2019 .Net Questions and Answers

    55/73

    What is marshalling? Explain types of marshalling.

    Latest answer: Marshaling is a process of transforming orserializing data from one application domain and exporting it to

    another application domain...........Read answer

    What is ObjRef object in remoting?

    Latest answer: ObjRef is a searializable object returned byMarshal() that knows about location of the remote object, hostname, port number, and object name........Read answer

    Explain the steps of acquiring a proxy object in web services.

    Latest answer: Every service listed has a URI pointing to theservice's DISCO or WSDL document, which is needed to access thewebservice and its 'webmethod" methods..........Read answer

    Explain the steps to create a web services and consume it.

    Latest answer: Create a new website by selecting "ASP.NET WebSite" and giving it a suitable name. service.cs file appears inside thesolution with a default webmethod named as "HelloWorld()"........Read answer

    Explain the difference between cache object and application

    object.

    Latest answer: Application Object: Application variable/objectstores an Object with a scope of availability of the entire

    Application unless explicitly destroyed.............Read answer

    What is Cache Callback in Cache?

    Latest answer: The cache object has dependencies e.g.relationships to the file it stores. Cache items remove the object

    http://net-remoting-what-is-marshalling.aspx/http://net-remoting-what-is-marshalling.aspx/http://net-remoting-what-is-objref-object.aspx/http://net-remoting-what-is-objref-object.aspx/http://web-services-steps-of-acquiring-a-proxy-object.aspx/http://web-services-steps-of-acquiring-a-proxy-object.aspx/http://web-services-steps-to-create-and-consume-it.aspx/http://web-services-steps-to-create-and-consume-it.aspx/http://asp-net-cache-object-and-application-object.aspx/http://asp-net-cache-object-and-application-object.aspx/http://asp-net-cache-object-and-application-object.aspx/http://asp-net-cache-callback-in-cache.aspx/http://net-remoting-what-is-marshalling.aspx/http://net-remoting-what-is-marshalling.aspx/http://net-remoting-what-is-objref-object.aspx/http://net-remoting-what-is-objref-object.aspx/http://web-services-steps-of-acquiring-a-proxy-object.aspx/http://web-services-steps-of-acquiring-a-proxy-object.aspx/http://web-services-steps-to-create-and-consume-it.aspx/http://web-services-steps-to-create-and-consume-it.aspx/http://asp-net-cache-object-and-application-object.aspx/http://asp-net-cache-object-and-application-object.aspx/http://asp-net-cache-object-and-application-object.aspx/http://asp-net-cache-callback-in-cache.aspx/
  • 7/31/2019 .Net Questions and Answers

    56/73

    when these dependencies change. As a work around we would needto simply execute a callback method............Read answer

    What is Scavenging?Latest answer: A process where items are removed from cache inorder to free the memory based on their priority. A property called"CacheItemPriority" is used to figure out the priority of each iteminside the cache...........Read answer

    Explain the types of Caching using Cache object of ASP.NET.

    Latest answer: Page output: Is used to fetch information or data atpage level. It is best used when the site is mainly static. Used bydeclaring the output page directive............Read answer

    Show with an example how to Cache different version of same

    page using ASP.NET Cache object.

    Latest answer: The ways to cache different versions on the same

    page using ASP.NET cache object is using OutputCacheobject............Read answer

    Explain how to implement Fragment Cache.

    Latest answer: Fragment cache is to store user controlsindividually within a web form in cache instead of the wholewebform as such. The idea is to simply have different cache

    parameters for different user controls.............Read answer

    Explain the various modes of storing ASP.NET session.

    Latest answer: Types of sessions: InProc: The default way to usesessions. InProc is the fastest way to store and access sessions...........

    http://asp-net-cache-callback-in-cache.aspx/http://asp-net-what-is-scavenging.aspx/http://asp-net-what-is-scavenging.aspx/http://asp-net-types-of-caching.aspx/http://asp-net-types-of-caching.aspx/http://asp-net-how-to-cache-different-version-of-same-page.aspx/http://asp-net-how-to-cache-different-version-of-same-page.aspx/http://asp-net-how-to-cache-different-version-of-same-page.aspx/http://asp-net-how-to-implement-fragment-cache.aspx/http://asp-net-how-to-implement-fragment-cache.aspx/http://asp-net-various-modes-of-storing-session.aspx/http://asp-net-cache-callback-in-cache.aspx/http://asp-net-what-is-scavenging.aspx/http://asp-net-what-is-scavenging.aspx/http://asp-net-types-of-caching.aspx/http://asp-net-types-of-caching.aspx/http://asp-net-how-to-cache-different-version-of-same-page.aspx/http://asp-net-how-to-cache-different-version-of-same-page.aspx/http://asp-net-how-to-cache-different-version-of-same-page.aspx/http://asp-net-how-to-implement-fragment-cache.aspx/http://asp-net-how-to-implement-fragment-cache.aspx/http://asp-net-various-modes-of-storing-session.aspx/
  • 7/31/2019 .Net Questions and Answers

    57/73

    Read answer

    What are the benefits and limitations of using hidden fields?

    Latest answer: Advantages: Easy to implement, Hidden fields are

    supported by all browsers, Enables faster access of informationbecause data is stored on client side............Read answer

    What are the benefits and limitations of using Hidden Frames?

    Latest answer: Advantages:Hidden frames allow you to cachemore than one data field, The ability to cache and access data itemsstored in different hidden forms...........

    Read answer

    What are benefits and limitations of using Cookies?

    Latest answer: Advantages:They are simple to use. Light in size,thus occupy less memory. Stores server information on client side.Data need not to be sent back to server........Read answer

    What is QueryString and what are benefits and limitations of

    using querystring?

    Latest answer: Querystring is way to transfer information from onepage to another through the URL........Read answer

    What is Absolute and Sliding expiration in .NET?

    Latest answer: Absolute and sliding expiration are two Time based

    expiration strategies. Absolute Expiration: Cache in this case expiresat a fixed specified date or time..............Read answer

    Explain the concepts and capabilities of cross page posting.

    Latest answer: Cross-page posting is done at the control level. It is

    http://asp-net-various-modes-of-storing-session.aspx/http://asp-net-benefits-and-limitations-of-using-hidden-fields.aspx/http://asp-net-benefits-and-limitations-of-using-hidden-fields.aspx/http://asp-net-benefits-and-limitations-of-hidden-frames.aspx/http://asp-net-benefits-and-limitations-of-hidden-frames.aspx/http://asp-net-benefits-and-limitations-of-using-cookies.aspx/http://asp-net-benefits-and-limitations-of-using-cookies.aspx/http://asp-net-benefits-and-limitations-of-using-querystring.aspx/http://asp-net-benefits-and-limitations-of-using-querystring.aspx/http://asp-net-benefits-and-limitations-of-using-querystring.aspx/http://asp-net-what-is-absolute-and-sliding-expiration.aspx/http://asp-net-what-is-absolute-and-sliding-expiration.aspx/http://asp-net-concepts-of-cross-page-posting.aspx/http://asp-net-various-modes-of-storing-session.aspx/http://asp-net-benefits-and-limitations-of-using-hidden-fields.aspx/http://asp-net-benefits-and-limitations-of-using-hidden-fields.aspx/http://asp-net-benefits-and-limitations-of-hidden-frames.aspx/http://asp-net-benefits-and-limitations-of-hidden-frames.aspx/http://asp-net-benefits-and-limitations-of-using-cookies.aspx/http://asp-net-benefits-and-limitations-of-using-cookies.aspx/http://asp-net-benefits-and-limitations-of-using-querystring.aspx/http://asp-net-benefits-and-limitations-of-using-querystring.aspx/http://asp-net-benefits-and-limitations-of-using-querystring.aspx/http://asp-net-what-is-absolute-and-sliding-expiration.aspx/http://asp-net-what-is-absolute-and-sliding-expiration.aspx/http://asp-net-concepts-of-cross-page-posting.aspx/
  • 7/31/2019 .Net Questions and Answers

    58/73

    possible to create a page that posts to different pages depending onwhat button the user clicks on. It is handled by done by changing the

    postbackurl property of the controls..........Read answer

    Explain how to access ViewState value of this page in the next

    page.

    Latest answer: PreviousPage property is set to the page property ofthe nest page to access the viewstate value of the page in the next

    page. Page poster = this.PreviousPage;..........Read answer

    What is SQL Cache Dependency in ASP.NET?

    Latest answer: SQL Cache Dependency in ASP.NET: It is themechanism where the cache object gets invalidated when the relateddata or the related resource is modified.........Read answer

    Explain the concepts of Post Cache Substitution in .NET

    Latest answer: Post Cache Substitution: It works opposite to

    fragment caching. The entire page is cached, except what is to bekept dynamic. When [OutputCache] attribute is used, the page iscached............Read answer

    Explain the use of localization and Globalization.

    Latest answer: Users of different countries, use different languagesand others settings like currency, and dates. Therefore, applications

    are needed to be configurable as per the required settings based oncultures, regions, countries........Read answer

    http://asp-net-concepts-of-cross-page-posting.aspx/http://asp-net-how-to-access-viewstate-value.aspx/http://asp-net-how-to-access-viewstate-value.aspx/http://asp-net-how-to-access-viewstate-value.aspx/http://asp-net-what-is-sql-cache-dependency.aspx/http://asp-net-what-is-sql-cache-dependency.aspx/http://asp-net-concepts-of-post-cache-substitution.aspx/http://asp-net-concepts-of-post-cache-substitution.aspx/http://asp-net-use-of-localization-and-globalization.aspx/http://asp-net-use-of-localization-and-globalization.aspx/http://asp-net-concepts-of-cross-page-posting.aspx/http://asp-net-how-to-access-viewstate-value.aspx/http://asp-net-how-to-access-viewstate-value.aspx/http://asp-net-how-to-access-viewstate-value.aspx/http://asp-net-what-is-sql-cache-dependency.aspx/http://asp-net-what-is-sql-cache-dependency.aspx/http://asp-net-concepts-of-post-cache-substitution.aspx/http://asp-net-concepts-of-post-cache-substitution.aspx/http://asp-net-use-of-localization-and-globalization.aspx/http://asp-net-use-of-localization-and-globalization.aspx/
  • 7/31/2019 .Net Questions and Answers

    59/73

    Explain the concepts of CODE Page approach. What are the

    disadvantages of this approach?

    Latest answer: Code Page was used before Unicode came into

    existence. It was a technique to represent characters in differentlanguages..........Read answer

    What are resource files and explain how do we generate

    resource files?

    Latest answer: Resource files are files in XML format. Theycontain all the resources needed by an application. These files can

    be used to store string, bitmaps, icons, fonts........Read answer

    What are Satellite assemblies and how to generate Satellite

    assemblies?

    Latest answer: To support the feature of multiple languages, weneed to create different modules that are customized on the basis oflocalization. These assemblies created on the basis of differentmodules are knows as satellite assemblies...........

    Read answer

    Define AL.EXE and RESGEN.EXE.

    Latest answer: Al.exe: It embeds the resources into a satelliteassembly. It takes the resources in .resources binary format.......Read answer

    Explain the concepts of resource manager class.

    Latest answer: ResourceManager class: It provides convenientaccess to resources that are culture-correct. The access is provided atrun time.........Read answer

    http://asp-net-concepts-of-code-page-approach.aspx/http://asp-net-concepts-of-code-page-approach.aspx/http://asp-net-concepts-of-code-page-approach.aspx/http://asp-net-how-to-generate-resource-files.aspx/http://asp-net-how-to-generate-resource-files.aspx/http://asp-net-how-to-generate-resource-files.aspx/http://asp-net-what-are-satellite-assemblies.aspx/http://asp-net-what-are-satellite-assemblies.aspx/http://asp-net-what-are-satellite-assemblies.aspx/http://asp-net-what-is-al.exe-and-resgen.exe.aspx/http://asp-net-what-is-al.exe-and-resgen.exe.aspx/http://asp-net-concepts-of-resource-manager-class.aspx/http://asp-net-concepts-of-resource-manager-class.aspx/http://asp-net-concepts-of-code-page-approach.aspx/http://asp-net-concepts-of-code-page-approach.aspx/http://asp-net-concepts-of-code-page-approach.aspx/http://asp-net-how-to-generate-resource-files.aspx/http://asp-net-how-to-generate-resource-files.aspx/http://asp-net-how-to-generate-resource-files.aspx/http://asp-net-what-are-satellite-assemblies.aspx/http://asp-net-what-are-satellite-assemblies.aspx/http://asp-net-what-are-satellite-assemblies.aspx/http://asp-net-what-is-al.exe-and-resgen.exe.aspx/http://asp-net-what-is-al.exe-and-resgen.exe.aspx/http://asp-net-concepts-of-resource-manager-class.aspx/http://asp-net-concepts-of-resource-manager-class.aspx/
  • 7/31/2019 .Net Questions and Answers

    60/73

  • 7/31/2019 .Net Questions and Answers

    61/73

    Explain the different transaction isolation levels in WCF.

    Latest answer: Read Uncommitted: - Also known as Dirtyisolation level. It makes sure that corrupt Data cannot be read. This

    is the lowest isolation level............Read answer

    What are Volatile and Dead letter queues?

    Latest answer: Volatile Queues: There are scenarios in the projectwhen you want the message to deliver in proper time. The timelydelivery of message is very more important and to ensure they arenot lost is important too. Volatile queues are used for such

    purposes.............Read answer

    What is Windows workflow foundation?

    Latest answer: Windows Workflow Foundation (WF):It is aplatform for building, managing and executing workflow-enabledapplications, for designing and implementing a programmingmodel ..........Read answer

    Explain the types of Workflow in Windows Workflow

    Foundation.

    Latest answer: There are 3 types of workflows in WWF:Sequential Workflow: The sequential workflow style executes a setof contained activities in order, one by one and does not provide anoption to go back to any step...........Read answer

    What are XOML files? Explain their uses.

    Latest answer: XOML is an acronym for Extensible ObjectMarkup Language. XOML files are the markup files. They are usedto declare the workflow and are then compiled with the filecontaining the implementation logic..............

    http://wcf-different-transaction-isolation-levels.aspx/http://wcf-different-transaction-isolation-levels.aspx/http://wcf-volatile-and-dead-letter-queues.aspx/http://wcf-volatile-and-dead-letter-queues.aspx/http://wf-what-is-windows-workflow-foundation.aspx/http://wf-what-is-windows-workflow-foundation.aspx/http://wf-types-of-workflow.aspx/http://wf-types-of-workflow.aspx/http://wf-types-of-workflow.aspx/http://wf-what-are-xoml-files.aspx/http://wcf-different-transaction-isolation-levels.aspx/http://wcf-different-transaction-isolation-levels.aspx/http://wcf-volatile-and-dead-letter-queues.aspx/http://wcf-volatile-and-dead-letter-queues.aspx/http://wf-what-is-windows-workflow-foundation.aspx/http://wf-what-is-windows-workflow-foundation.aspx/http://wf-types-of-workflow.aspx/http://wf-types-of-workflow.aspx/http://wf-types-of-workflow.aspx/http://wf-what-are-xoml-files.aspx/
  • 7/31/2019 .Net Questions and Answers

    62/73

    Read answer

    How to make an application offline in ASP.NET 2.0.

    Latest answer: Microsoft's Internet Information Services web

    server software is used to make an application offline. The IIS isinstructed to route all incoming requests for the web site to anotherURL automatically........Read answer

    What are script injection attacks?

    Latest answer: Script injection attacks called Cross-site scripting(XSS) attacks exploit vulnerabilities in Web page validation by

    injecting client-side script code.............Read answer

    What is Authentication in ASP.NET?

    Latest answer: Authentication is the process of verifying usersdetails and find if the user is a valid user to the system or not. This

    process of authentication is needed to provide authority to theuser........

    Read answerWhat is Authorization in ASP.NET?

    Latest answer: Authorization is a process that takes place based onthe authentication of the user. Once authenticated, based on userscredentials, it is determined what rights des a user have...........Read answer

    What is the difference between login controls and Forms

    authentication?

    Login controls are part of ASP. Nets UI controls collection whichallows users to enter their username and password to login to awebsite/application. They provide login solution without the need ofwriting code...........

    http://wf-what-are-xoml-files.aspx/http://asp-net-how-to-make-an-application-offline.aspx/http://asp-net-how-to-make-an-application-offline.aspx/http://asp-net-what-are-script-injection-attacks.aspx/http://asp-net-what-are-script-injection-attacks.aspx/http://asp-net-what-is-authentication.aspx/http://asp-net-what-is-authentication.aspx/http://asp-net-what-is-authorization.aspx/http://asp-net-what-is-authorization.aspx/http://asp-login-controls-and-forms-authentication.aspx/http://asp-login-controls-and-forms-authentication.aspx/http://wf-what-are-xoml-files.aspx/http://asp-net-how-to-make-an-application-offline.aspx/http://asp-net-how-to-make-an-application-offline.aspx/http://asp-net-what-are-script-injection-attacks.aspx/http://asp-net-what-are-script-injection-attacks.aspx/http://asp-net-what-is-authentication.aspx/http://asp-net-what-is-authentication.aspx/http://asp-net-what-is-authorization.aspx/http://asp-net-what-is-authorization.aspx/http://asp-login-controls-and-forms-authentication.aspx/http://asp-login-controls-and-forms-authentication.aspx/
  • 7/31/2019 .Net Questions and Answers

    63/73

    Read answer

    What is Fragment Caching in ASP.NET?

    Fragment caching does not cache a WebForm, rather it allows for

    caching of individual user controls within a Web Form, where eachcontrol can have different cache duration and behavior...........Read answer

    What is partial classess in .net?

    .Net2.0 supports the concept of partial classes which is unlike theconcept of one class one file. In .Net technology, one can define asingle class over multiple files using the concept of partial

    classes............Read answer

    Explain how to pass a querystring from an .asp page to aspx

    page.

    Yesyoucandoitusingahyperlink
    Click to go to aspx .............Read answer

    Overview of the .NET Compact Framework

    .NET Compact Framework is a scaled down versions of .NETframework for supporting Windows CE based mobile and embeddeddevices like mobile phones...............

    What is Language Integrated Query (LINQ)?

    LINQ is a set of extensions to .NET Framework that encapsulate

    language integrated query, set and other transformationoperations...................

    Next>> Part 2 | Part 3 | Part 4 | Part 5 | Part 6

    Download ASP.NET interview questions and answers pdf.NET online practice tests

    http://asp-login-controls-and-forms-authentication.aspx/http://asp-fragment-caching.aspx/http://asp-fragment-caching.aspx/http://asp-partial-classes.aspx/http://asp-partial-classes.aspx/http://asp-querystring.aspx/http://asp-querystring.aspx/http://asp-querystring.aspx/http://net-compact-framework-overview.aspx/http://linq-overview.aspx/http://asp-net-interview-question-2.aspx/http://asp-net-interview-question-2.aspx/http://asp-net-interview-question-3.aspx/http://asp-net-interview-question-4.aspx/http://asp-net-interview-question-5.aspx/http://asp-net-interview-questions.aspx/http://career-jobs-interview-updates.aspx/http://online-practice-test.aspx/http://asp-login-controls-and-forms-authentication.aspx/http://asp-fragment-caching.aspx/http://asp-fragment-caching.aspx/http://asp-partial-classes.aspx/http://asp-partial-classes.aspx/http://asp-querystring.aspx/http://asp-querystring.aspx/http://asp-querystring.aspx/http://net-compact-framework-overview.aspx/http://linq-overview.aspx/http://asp-net-interview-question-2.aspx/http://asp-net-interview-question-2.aspx/http://asp-net-interview-question-3.aspx/http://asp-net-interview-question-4.aspx/http://asp-net-interview-question-5.aspx/http://asp-net-interview-questions.aspx/http://career-jobs-interview-updates.aspx/http://online-practice-test.aspx/
  • 7/31/2019 .Net Questions and Answers

    64/73

    Also Read

    ASP.NET DataList Control

    Using the DataList control, Binding images to a DataList controldynamically, Displaying data using the DataList control, Selecting,editing and delete data using this control, Handling the DataListcontrol events..........

    ASP.NET Methodologies

    ASP.NET attempts to make the web development methodology like

    the GUI development methodology by allowing developers to buildpages made up of controls similar to a GUI. Server controls inASP.NET function similarly to GUI controls in otherenvironments..........

    Problems ASP.NET Solves

    Microsoft developed ASP.NET, which greatly simplifies the webdevelopment methodology...........

    ASP.NET issues & options

    The truth is that ASP.NET has several issues that need to beaddressed..........

    Explain the advantages of ASP.NET

    Web application exists in compiled form on the server so theexecution speed is faster as compared to the interpreted scripts.........

    http://asp-net-datalist-control.aspx/http://asp-net-development-methodologies.aspx/http://asp-net-solves-problems.aspx/http://asp-net-issues.aspx/http://asp-net-advantages.aspx/http://asp-net-datalist-control.aspx/http://asp-net-development-methodologies.aspx/http://asp-net-solves-problems.aspx/http://asp-net-issues.aspx/http://asp-net-advantages.aspx/
  • 7/31/2019 .Net Questions and Answers

    65/73

    What Is ASP.NET 2.0 AJAX?

    AJAX-style communications between client and server. This

    communication is over web services. Asynchronous

    communication. All client-to-server communication in theASP.NET 2.0 AJAX framework is asynchronous................

    The components in the ASP.NET 2.0 AJAX packaging

    ASP.NET AJAX Futures Community Technology Preview

    (CTP) The ASP.NET