Interview question for Asp.Net in .NET

1.What namespaces are necessary to create a localized application?

System.Globalization System.Resources

2. Which class deals wit the user’s locale information?

System.Web.UI.Page.Culture

3. What is Remoting?

Remoting is a means by which one operating system process, or program, can communicate with another process. The two processes can exist on the same computer or on two computers connected by a LAN or the Internet.

4. What's the difference between the Debug class and Trace class?

Documentation looks the same. Use Debug class for debug builds. use Trace class for both debug and release builds.

5. What is Globalization?

Globalization is the process of creating multilingual application by defining culture specific features like currency, date and time format, calendar and other issues.

6. What is the difference between javascript and vbscript?

Javascript : JavaScript is a client-side scripting language. JavaScript is used to create interactive web applications supported by the Netscape browser. JavaScript is simple to use, lightweight, and dynamic. Developers can easily embed code functionality for interactive applications inside a web page. Javascript is case sensitive and it will be run on client side. VBScript: VBScript is a server-side scripting language. VBScript is not case sensitive and it will be run on server side.

7. What is a web server?

A web server delivers requested web pages to users who enter the URL in a web browser. Every computer on the Internet that contains a web site must have a web server program.

8. What are Cascading style sheets?

Cascading style sheets (CSS) collect and organize all of the formatting information applied to HTML elements on a Web form. Because they keep this information in a single location, style sheets make it easy to adjust the appearance of Web applications.

9. What are remotable objects in .NET Remoting?

Remotable objects are the objects that can be marshaled across the application domains. You can marshal by value, where a deep copy of the object is created and then passed to the receiver. You can also marshal by reference, where just a reference to an existing object is passed.

10.What is the differences between Server-side and Client-side code?

Server-side code executes on the server. Client-side code executes in the client’s browser.

11. What is the difference between Server-side scripting and Client-side scripting?

Server side scripting means that all the script will be executed by the server and interpreted as needed. ASP doesn't have some of the functionality like sockets, uploading, etc. Client side scripting means that the script will be executed immediately in the browser such as form field validation, clock, email validation, etc. Client side scripting is usually done in VBScript or JavaScript.

12. What is Authentication and Authorization?

Athentication is the process of identifying users. Authentication is identifying/validating the user against the credentials (username and password) and Authorization performs after authentication. Authorization is the process of granting access to those users based on identity. Authorization allowing access of specific resource to user.

13. What are the types of Authentication?

There are 3 types of Authentication. Windows, Forms and Passport Authentication. Windows authentication uses the security features integrated into the Windows NT and Windows XP operating systems to authenticate and authorize Web application users. Forms authentication allows you to create your own list/database of users and validate the identity of those users when they visit your Web site. Passport authentication uses the Microsoft centralized authentication provider to identify users. Passport provides a way to for users to use a single identity across multiple Web applications. To use Passport authentication in your Web application, you must install the Passport SDK.

14. What are the different types of Validation Controls?

There are six types of validation controls available : RequiredFieldValidator RangeValidator RegularExpressionValidator CompareValidator CustomValidator ValidationSummary.

15. How do you validate the controls in an ASP .NET page?

Using special validation controls that are meant for this. We have Range Validator, Email Validator.

16. What are the validation controls?

A set of server controls included with ASP.NET that test user input in HTML and Web server controls for programmer-defined requirements. Validation controls perform input checking in server code. If the user is working with a browser that supports DHTML, the validation controls can also perform validation using client script.

17. What is ValidationSummary?

ValidationSummary - It show a summary of errors raised by each control on the page on a specific spot or in a message box.

18. What is role based security?

By default, ASP.NET will store the session state in the same process that processes the request, just as ASP does. If cookies are not available, a session can be tracked by adding a session identifier to the URL.

19. What are the various security methods which IIS Provides apart from .NET?

The various security methods which IIS provides are : Authentication Modes. IP Address and Domain Name Restriction. DNS Lookups DNS Lookups. Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources. The Network ID and Subnet Mask. SSL.

20. Define RequiredFieldValidator?

It checks whether the control have any value. It's used when you want the control should not be empty.

21. Which two properties are on every validation control?

We have two common properties for every validation controls: Control to Validate Error Message

22. What is the difference between Custom Control and User Control?

Custom Controls are compiled code (Dlls), easier to use, difficult to create, and can be placed in toolbox. Drag and Drop controls. Attributes can be set visually at design time. Can be used by Multiple Applications (If Shared Dlls), Even if Private can copy to bin directory of web application add reference
and use. Normally designed to provide common functionality independent of consuming Application.
User Controls are similar to those of ASP include files, easy to create, can not be placed in the toolbox and dragged - dropped from it. A User Control is shared among the single application files.

23. Which control would you use if you needed to make sure the values in two different controls matched?

CompareValidator is used to ensure that two fields are identical.

24. What is strong-typing versus weak-typing?

Strong typing implies that the types of variables involved in operations are associated to the variable, checked at compile-time, and require explicit conversion Weak typing implies that they are associated to the value, checked at run-time, and are implicitly converted as required.

25. In which event are the controls fully loaded?

Page_load event guarantees that all controls are fully loaded. Controls are also accessed. In Page_Init events but you will see that viewstate is not fully loaded during this event.

26. What is the Composite Custom Control?

Combination of existing HTML and Server Controls.

27. What is RangeValidator?

RangeValidator - checks whether a value falls within a given range of number, date or string.

28. What base class do all Web Forms inherit from?

System.web.UI.Page class

29. What is the Web User Control?

Combines existing Server and/or HTML controls by using VS.Net to create functional units that encapsulate some aspects of UI. Resides in Content Files, which must be included in project in which the controls are used.

30. What are the layouts of ASP.NET Pages?

GridLayout FlowLayout . GridLayout positions the form object on absolute x and y co-ordinates of the screen. FlowLayout positions the form objects relative to each other.

31. What data type does the RangeValidator control support?

Integer String. Date.

32. What is the lifespan for items stored in ViewState?

Items stored in a ViewState exist for the life of the current page, including the post backs on the same page.
33.Can we disable ViewState, If, yes how?

ViewState can be disabled by using "EnableViewState" property set to false.

34. Where is View State information stored?

In HTML Hidden Fields.

35. What is the difference between Custom Control and User Control?

Custom Controls are compiled code (Dlls), easier to use, difficult to create, and can be placed in toolbox. Drag and Drop controls. Attributes can be set visually at design time. Can be used by Multiple Applications (If Shared Dlls), Even if Private can copy to bin directory of web application add reference and use. Normally designed to provide common functionality independent of consuming Application. User Controls are similar to those of ASP include files, easy to create, can not be placed in the toolbox and dragged - dropped from it. A User Control is shared among the single application files.

36. What is ViewState?

ViewState is a .Net mechanism to store the posted data among post backs. ViewState allows the state of objects to be stored in a hidden field on the page, saved on client side and transported back to server whenever required.