- What is an interface and what is an abstract class? Please, expand by examples of using both. Explain why.
- What is serialization, how it works in .NET?
- What should one do to make class serializable?
- What exactly is being serialized when you perform serialization?
- Tell me about 6h4 methods you have used to perform serialization.
- Did you work with XML and XSL Transformations?
- What methods and what for did you use to work with XML?
- What is the purpose of reserved word “using” in C#?
- How does output caching work in ASP.NET?
- What is connection pooling and how do you make your application use it?
- What are different methods of session maintenance in ASP.NET?
- What is Viewstate?
- Can any object be stored in a Viewstate?
- What should you do to store an object in a Viewstate?
- Explain how Viewstate is being formed and how it’s stored on client.
- Explain control life cycle, mind event order.
- What do you know about ADO.NET’s objects and methods?
- Explain DataSet.AcceptChanges and DataAdapter.Update methods.
- Assume you want to update a record in the database using ADO.NET. What necessary steps you should perform to accomplish this?
- How to retreive the value of last identity has been updated in a database (SQL Server)?
Search Your Question
Thursday, May 29, 2008
ASP.net Interview Questions
Basic .NET Framework Interview question
(B)What is a IL? Twist :- What is MSIL or CIL , What is JIT?(IL)Intermediate Language is also known as MSIL (Microsoft Intermediate Language) or CIL(Common Intermediate Language). All .NET source code is compiled to IL. This IL is then converted to machine code at the point where the software is installed, or at run-time by a Just-In-Time (JIT) compiler.
(B)What is a CLR? Full form of CLR is Common Language Runtime and it forms the heart of the .NET framework. All Languages have runtime and its the responsibility of the runtime to take care of the code execution of the program. For example VC++ has MSCRT40.DLL,VB6 has MSVBVM60.DLL,Java has Java Virtual Machine etc. Similarly .NET has CLR. Following are the responsibilities of CLR
- Garbage Collection:- CLR automatically manages memory thus eliminating memory leaks. When objects are not referred GC automatically releases those memories thus providing efficient memory management.
- Code Access Security :- CAS grants rights to program depending on the security configuration of the machine. Example the program has rights to edit or create a new file but the security configuration of machine does not allow the program to delete a file. CAS will take care that the code runs under the environment of machines security configuration.
- Code Verification :- This ensures proper code execution and type safety while the code runs. It prevents the source code to perform illegal operation such as accessing invalid memory locations etc.
(B)What is a CTS? In order that two language communicate smoothly CLR has CTS (Common Type System).Example in VB you have “Integer” and in C++ you have “long” these data types are not compatible so the interfacing between them is very complicated. In order to able that two different languages can communicate Microsoft introduced Common Type System. So “Integer” data type in VB6 and “int” datatype in C++ will convert it to System.int32 which is datatype of CTS. CLS which is covered in the coming question is subset of CTS. Note: If you have undergone COM programming period interfacing VB6 application with VC++ application was a real pain as the datatype of both languages did not have a common ground where they can come and interface, by having CTS interfacing is smooth.
(B)What is a CLS(Common Language Specification)?This is a subset of the CTS which all .NET languages are expected to support. It was always a dream of Microsoft to unite all different languages in to one umbrella and CLS is one step towards that. Microsoft has defined CLS which are nothing but guidelines that language to follow so that it can communicate with other .NET languages in a seamless manner.
(B)What is a Managed Code? Managed code runs inside the environment of CLR i.e. .NET runtime. In short all IL are managed code. But if you are using some third party software example VB6 or VC++ component they are unmanaged code as .NET runtime (CLR) does not have control over the source code execution of the language.
(B)What is a Assembly?
- Assembly is unit of deployment like EXE or a DLL.
- An assembly consists of one or more files (dlls, exe’s, html files etc.), and represents a group of resources, type definitions, and implementations of those types. An assembly may also contain references to other assemblies. These resources, types and references are described in a block of data called a manifest. The manifest is part of the assembly, thus making the assembly self-describing.
- An assembly is completely self-describing. An assembly contains meta data information, which is used by the CLR for everything from type checking and security to actually invoking the components methods. As all information is in the assembly itself, it is independent of registry. This is the basic advantage as compared to COM where the version was stored in registry.
- Multiple versions can be deployed side by side in different folders. These different versions can execute at the same time without interfering with each other. Assemblies can be private or shared. For private assembly deployment, the assembly is copied to the same directory as the client program that references it. No registration is needed, and no fancy installation program is required.
- When the component is removed, no registry cleanup is needed, and no uninstall program is required. Just delete it from the hard drive.
- In shared assembly deployment, an assembly is installed in the Global Assembly Cache (or GAC). The GAC contains shared assemblies that are globally accessible to all .NET applications on the machine.
(A) What are the different types of Assembly? There are two types of assembly Private and Public assembly. A private assembly is normally used by a single application, and is stored in the application's directory, or a sub-directory beneath. A shared assembly is normally stored in the global assembly cache, which is a repository of assemblies maintained by the .NET runtime. Shared assemblies are usually libraries of code which many applications will find useful, e.g. Crystal report classes which will be used by all application for Reports.
(B) What is NameSpace? Namespace has two basic functionality :-
- NameSpace Logically group types, example System. Web.UI logically groups our UI related features.
- In Object Oriented world many times its possible that programmers will use the same class name. By qualifying NameSpace with class name this collision can be avoided.
(B) What is Difference between NameSpace and Assembly? Following are the differences between namespace and assembly :
- Assembly is physical grouping of logical units. Namespace logically groupsclasses.vNamespace can span multiple assembly.
Monday, May 26, 2008
ASP Interview Questions
What is ASP?
ASP stands for Active Server Pages. It is a server side technology which is used to display dynamic content on web pages. For example you could write code that would give your visitors different information, different images or even a totally different page depending on what browser version they are using.
How can you disable the browser to view the code?
Writing codes within the Tag
Question What is a "Virtual Directory"?
Virtual directories are aliases for directory paths on the server. It allows moving files on the disk between different folders, drives or even servers without changing the structure of web pages. It avoids typing an extremely long URL each time to access an ASP page.
Give the comment Tags for the following?
VBScript : REM & ‘(apostrophe)
JavaScript : // (single line comment)
/* */ (Multi-line comments)
Which is the default Scripting Language of ASP (server-side)?
VBScript
Which is the default Data types in VBScript?
Variant is the default data type in VBScript, which can store a value of any type.
What is a variable?
Variable is a memory location through which the actual values are stored/retrieved. Its value can be changed.
What is the maximum size of an array?
Up to 60 dimensions.
What is Querystring collection?
This collection stores any values that are provided in the URL. This can be generated by three methods:
By clicking on an anchor tag
By sending a form to the server by the GET method
Through user-typed HTTP address
It allows you to extract data sent to the server using a GET request.
What are the attributes of the tags? What are their functions?
The two attributes are ACTION and METHOD
The ACTION gives the name of the ASP file that should be opened next by which this file can access the information given in the form The METHOD determines which of the two ways (POST or GET) the browser can send the information to the server
What are the methods in Session Object?
The Session Object has only one method, which is Abandon. It destroys all the objects stored in a Session Object and releases the server resources they occupied.
What is ServerVariables collection?
The ServerVariables collection holds the entire HTTP headers and also additional items of information about the server.
What is the difference between Querystring collection and Form collection?
The main difference is that the Querystring collection gets appended to a URL.
What is a Form collection?
The Form collection holds the values of the form elements submitted with the POST method. This is the only way to generate a Form collection.
What are the ASP Scripting Objects?
The Dictionary object, the FileSystemObject object, TextStream object.
What happens to a HTML page?
The browser makes a HTTP request; the server gives a HTTP response to the browser and the browser converts into a HTML page.
What happens to ASP pages?
The browser makes a HTTP request; the server does the processing and gives a HTML response to the browser.
How can you change the primary scripting language for a page?
Specify
What is application Object?
Shares information among users of an application. Gives a notification when an application starts or ends.
What is the difference between client-side script and server-side script?
Scripts executed only by the browser without contacting the server is called client-side script. It is browser dependent. The scripting code is visible to the user and hence not secure. Scripts executed by the web server and processed by the server is called server-side script.
What is the command to display characters to the HTML page?
Response.Write
Explain the POST & GET Method or Explain the difference between them?
POST METHOD:
The POST method generates a FORM collection, which is sent as a HTTP request body. All the values typed in the form will be stored in the FORM collection.
GET METHOD:
The GET method sends information by appending it to the URL (with a question mark) and stored as A Querystring collection. The Querystring collection is passed to the server as name/value pair.
The length of the URL should be less than 255 characters.
How many global.asa files can an Application have?
Only one global.asa file and it’s placed in the virtual directory’s root.
How many global.asa files can an Application have?
Only one global.asa file and it’s placed in the virtual directory’s root.
What are Scripting Objects?
Objects that can enhance the application are known as the Scripting Objects.
What is the Order of precedence for LOGICAL Operators.
NOT, AND, OR, XOR, EQV, IMP
What is an Err Object?
Name it’s properties and methods.
What are LOCAL and GLOBAL variables?
Local variables lifetime ends when the Procedure ends. Global variables lifetime begins at the start of the script and ends at the end of the script and it can be used by any procedure within the script. Declaring a variable by using the keyword PRIVATE makes the variable global within the script, but if declared using PUBLIC, then all scripts can refer the variable.
Which is the default Scripting Language on the client side?
JavaScript
What is HTML(Hypertext Markup Language)?
It’s a method by which web pages can be built and generally used for formatting and linking text.
What is a Web Server?
It’s a Computer that provides Web services on the Internet or on a local Intranet. It is designed to locate, address and send out simple HTML pages to all other users who access these pages.
What is Session Object?
It stores information about a User’s session. Gives a notification when a user session begins or ends.
What is Server-Side includes?
It provides extra information by which it makes the site easier to manage. It can include text files using the #include statement, retrieve the size and last modification date of a file, defines how variables and error messages are displayed and inserts the values of HTTP variables in the page sent back to the browser.
What is a FileSystemObject object?
It provides access to the physical file system of the web server. It gets and manipulates information about all drives in a server, folders and sub-folders on a drive and files inside a folder.
What is a Scripting Language?
It permits to create more interactive Web Pages. Validation, formatting of web pages can be done. VBScript, JavaScript are some examples.
What is a Dictionary object?
It lets you store and retrieve information in a flexible data structure. Each value or information stored in a Dictionary is associated with a key through which the information can be retrieved.
What is Global.asa file?
It is text file that contains details about an ASP application, such as when it should begin and end.
What is an .ASP file?
It is a Text File that contains the combination of the following:
Text
HTML tags
Script Commands
What is Response Object?
It controls the information sent to the user. The various methods are:
Response.Write - Sends information directly to a browser
Response.Redirect - Directs a user to a URL other than the requested URL
Response.ContentType - Controls the type of content sent
Response.Cookies - Sets cookie values
Response.Buffer - To Buffer information
Naming constraints for a variable ?
It can be up to 255 characters Must start with an alphabet Must not contain an embedded period or full-stop
What is a TextStream object?
It allows you to access(read/write) the contents of text files stored on the web server.
What is IIS?
IIS is a Web Server that provides Web services, not only for web pages but also for ftp sites and video and audio services. It integrates with the database facilities of SQL Server.
What is Request Object?
Gets information from the user. It has five collections by which values can be accessed. They are: Querystring, Form, Cookies, Server Variables & ClientCertificate
What are the special sub-types in VBScript?
EMPTY: has no value
NULL: Value does not exist (conjunction with database)
OBJECT:
What is Cookies collection?
Cookies are text files that store information about the user by which the web server identifies and marks each different visitor to a web site and determines where a user has been before. A cookie can store information only when the user sends it. Individual cookies are limited to 4KB of data. The maximum number of cookies allowed is 300.
Cookies are stored on client’s machine.
What is the difference between Cookies collection and Form/Querystring collection?
Cookie collection does not have the Count property. Cookies can have multiple values for the same cookie name but each value can be referred using a key whereas in a Form/Querystring cookie each value has to be referred using an index value.
What is Server Object?
Controls the ASP execution environment. It can set the amount of time script can run before an error occurs. Converts a virtual path to a physical path on the server. Takes a user supplied string and encode it into proper format for a URL string.
What is Collection?
Collection is a set of name/value pairs where the information supplied by the client is stored.
How will you delete a Cookie?
By setting its Expires property to any date prior to today Response.Cookies("cookie name"). Expires = Date 1.
What is the function of Buffer in Response Object?
Buffer controls the HTML output stream manually.
How are scripts executed?
ASP provides scripting engines that execute the corresponding scripting languages on the server side. Scripts should be encoded within the Delimiters.
What is ASP (Active Server Pages)?
ASP is a server side-scripting environment for building dynamic and interactive web pages. Since the scripts run on the server side, the web server does all the processing.
What are ARRAYS?
Arrays are variables that store items of similar information.DIM ARRAY1(4) (declares an array with the name array1 with 5 elements)
What is Application-scope?
Application-scope means that variables (and objects) can be accessed from any ASP pages that is part of the application.
What is Extranet?
An area of a web site available only to a set of registered visitors.
What is a session?
A user accessing an application is known as a session.
What is ClientCertificate collection?
A ClientCertificate is an encrypted number that is stored in a file on the user’s computer. This stores details of any security certificates included with the request.
What do you need to run ASP?
A browser and a Web server
What is the order of execution for an ASP application?
1) Global.asa
2) Server-side Includes
3) Jscript scripts tagged within
What are the types of HTML?
Static HTML Browser uses HTTP to request HTML file from the Web Server
Dynamic HTML Browser uses HTTP to request an executable application rather than a Static HTML file
What are the properties of Session Object?
SessionID returns the session identification number for each user.
Timeout sets the timeout period assigned to the Session object for any application, in minutes.
CodePage determines the code page that will be used to display content.
LCID a locale identifier, which determines time zone and language, rules for the system
What are the event handlers of Session Object?
Session _OnStart This event will be fired when a new user begins a session with the web site.
Session_OnEnd This event is called whenever a session terminates.
Name the ASP Objects?
Request Object
Response Object
Server Object
Session Object
Application Object
What are the advantages of using ASP?
Minimizes network traffic by limiting the need for the browser and server to talk to each other
Makes for quicker loading time since HTML pages are only downloaded
Allows to run programs in languages that are not supported by the browser
Can provide the client with data that does not reside on the client’s machine
Provides improved security measures since the script cannot be viewed by the browser
What are the methods in Application Object?
Lock prevents clients from modifying the variables stored in the Application object.
Unlock removes the lock from variables stored in the Application object.
What are the methods in Application Object?
Internet Information Server (IIS) on Windows NT
Personal Web Server (PWS) on Windows 95
Peer Web Services on Windows NT
What are the browsers that can access ASP pages?
Internet Explorer (supports VBScript, JavaScript)
Netscape Communicator/ Navigator (supports only JavaScript, VBScript can be also added too)
What are the methods by which output stream is controlled?
Flush sends previous buffered output to the client immediately, but continues processing the script.
Clear erases any already-buffered HTML.
End causes the server to stop processing the script.
What are the methods by which output stream is controlled?
What are the properties used to control the expiration of the page?
Expires specifies the number of minutes before a page cached on a browser expires.
ExpiresAbsolute sets the date and time at which a page cached on a browser expires.
What are the collections of Session Object?
Contents collection contains all the variables established for a session without using the tag.
Static collection contains all the objects created
What is the difference between ASP and HTML? Or Why ASP is better than HTML?
- ASP executes code on the server side whereas the browser interprets HTML.
- ASP can use any scripting languages
- Gets feedback from the user and return information to the user
- Create pages that will be customized to display only things that will be of interest to a particular user
- Can edit contents of a web page by updating a text file or a database rather than the HTML code itself
What are the event handlers of Application Object?
Application_OnStart- This event will be fired when the first visitor hits the page.
Application_OnEnd- This event runs when the server is stopped.
Name some of the ASP components?
Ad Rotator component- a way to manage advertisements on the web site.
Content Linker component - a technique to direct users through a set of pages on a web site by creating a list of URLs and description of the next and previous pages.
Browser Capabilities component - allows to customize the page to the ability of the browser viewing it.
Database Access component - allows to access data from the database
What are the tasks performed by <> tags?
tags provides space for the user to input values
the form has a button to submit information back to the server
It transfers control to another ASP page
It carries the information in the fields to another ASP page
What are the tags necessary to be present within the tag ?
-----tag: Provides input spaces (text boxes, combo boxes, radio button, etc.) on a form called fields. It has three attributes TYPE, NAME and VALUE. TYPE provides the characteristics of the field and the NAME specifies a name to the field by which it can be referred.
What are the collections of Application Object?
* Contents collection - contains all variables added via scripts in global.asa.
* Static collection - contains the names of all objects
How do you create a recordset object in VBScript?
Answer1
//First of all declare a variable to hold the Recordset object, ex-
Dim objRs
//Now, Create this varible as a Recordset object, ex-
Set objRs=Server.CreateObject(ADODB.RECORDSET)
Answer2
” rs.MoveNext
wend
end if
%’>
*. Create Recordset object
*. Place form field value in a variable named “param”
*. Define query by concatenating strings and variable value
*. Open RecordSet Object. Note that the first parameter is the Command Text. The second parameter is the Connection String. The Command Object and Connection Object are created implicitly.
*. Make sure the RecordSet isn’t empty
*. Begin executing a loop which goes through all records in the RecordSet.
*. Write each record’s “firstname” and “lastname” fields to the page on a separate line.
*. Move to Next Record.
Explain the difference between POST and GET Method.
GET requests are string data that is visible to the end user via the URL and a limit of 2kb, POST requests have no limit on total data and the user can’t see the data in a query string.
Why do we use Option Explicit?
Answer1
To avoid multiple variables of the same name.
Answer2:
Correct answer is - This statement force the declaration of variables in VB before using them.
How do you write an SQL insert statement?
insert into tablename (fieldA, fieldB, fieldC)Values(’dataA’, ‘dataB’, ‘dataC’);
How can you have different number of cells for each row of a table in HTML?
using colspan and rowspan
What variable can you use to share info across the whole application for one user?
Use the sessions object
What is string concatenation function in VBScript?
the ampersand symbol and ampersand space underscore across multiple lines
How do you get the value of a combo box in Javascript?
Answer1.
document.forms[’formName’].elements[’comboName’].options[i].value
Answer2.
document.form_name.element_name.value
What is a class in CSS?
Answer1
A class allows you to define different style characteristics to the same HTML element.
Answer2
class is a child to the id, id should be used only once, a css class can be used multiple times:
div id=”banner”
p class=”alert”
When inserting strings into a SQL table in ASP what is the risk and how can you prevent it?
SQL Injection, to prevent you probably need to use Stored Procedures instead of inline/incode SQL
Which is the default Data types in VBScript?
Variant.
Monday, May 19, 2008
Microprocessor Interview Questions
What are the different addressing modes in 8085?
What is the difference between MOV and MVI?
What are the functions of RIM, SIM, IN?
What is the immediate addressing mode?
What is an interrupt?
Which line will be activated when an output device require attention from CPU?
Which type of architecture 8085 has?
How many memory locations can be addressed by a microprocessor with 14 address lines?
8085 is how many bit microprocessor?
Why is data bus bi-directional?
What is the function of accumulator?
What is flag, bus?
What are tri-state devices and why they are essential in a bus oriented system?
Why are program counter and stack pointer 16-bit registers?
What does it mean by embedded system?
What are the different flags in 8085?
What happens during DMA transfer?
What do you mean by wait state? What is its need?
What is PSW?
What is ALE? Explain the functions of ALE in 8085.
What is a program counter? What is its use?
What is meant by D-FF?
What is the basic difference between Latches and Flip flops?
What is a multiplexer?
How can you convert an SR Flip-flop to a JK Flip-flop?
How can you convert an JK Flip-flop to a D Flip-flop?
What is Race-around problem? How can you rectify it?
Which semiconductor device is used as a voltage regulator and why?
What do you mean by an ideal voltage source?
What do you mean by zener breakdown and avalanche breakdown?
What is CMRR? Explain briefly.
BPFSK is more efficient than BFSK in presence of noise. Why?
What is meant by pre-emphasis and de-emphasis?
What do you mean by 3 dB cutoff frequency? Why is it 3 dB, not 1 dB?
What do you mean by ASCII, EBCDIC?
What do you mean by half-duplex and full-duplex communication? Explain briefly.
When transmitting digital signals is it necessary to transmit some harmonics in addition to fundamental frequency?
What are the different types of filters?
What is the need of filtering ideal response of filters and actual response of filters?
What is sampling theorem?
Which range of signals are used for terrestrial transmission?
What is the need for modulation?
Which type of modulation is used in TV transmission?
Why we use vestigial side band (VSB-C3F) transmission for picture?
What is impulse response?
Explain the advantages and disadvantages of FIR filters compared to IIR counterparts.
For asynchronous transmission, is it necessary to supply some synchronizing pulses additionally or to supply or to supply start and stop bit?
ASP.NET Interview Questions
Here is the list of .net interview questions on Interview Helper website:
- ASP.NET Interview Questions Part 1
- ASP.NET Interview Questions Part 2
- ASP.NET Interview Questions Part 3
- ASP.NET Interview Questions Part 4
- ASP.NET Interview Questions Part 5
- ASP.NET Interview Questions Part 6
- ASP.NET Interview Questions Part 7
- ASP.NET Interview Questions Part 8
- ASP.NET Interview Questions Part 9
- ASP.NET Interview Questions Part 10
- ASP.NET Interview Questions Part 11
- ASP.NET Interview Questions Part 12
- ASP.NET Interview Questions Part 13
- ASP.NET Interview Questions Part 14
- ASP.NET Interview Questions Part 15
Thursday, May 15, 2008
asp.net interview questions list
Here is the list of asp.net interview questions on Interview Helper website:
* ASP.NET Interview Questions Part 1
* ASP.NET Interview Questions Part 2
* ASP.NET Interview Questions Part 3
* ASP.NET Interview Questions Part 4
* ASP.NET Interview Questions Part 5
* ASP.NET Interview Questions Part 6
* ASP.NET Interview Questions Part 7
* ASP.NET Interview Questions Part 8
* ASP.NET Interview Questions Part 9
* ASP.NET Interview Questions Part 10
* ASP.NET Interview Questions Part 11
* ASP.NET Interview Questions Part 12
* ASP.NET Interview Questions Part 13
* ASP.NET Interview Questions Part 14
* ASP.NET Interview Questions Part 15