ASP.NET Interview Questions
Questions Answers Views Company eMail

After capturing the SelectIndexChanged event for a ListBox Control, you find that the event handler doesn?t execute. What could be the problem be? a) The AutoEventWireup attribute is set to False b) The AutomaticPostBack attribute is set to False c) The codebehind module is not properly compiled d) The ListBox must be defined WithEvents.

Syntax Softtech,

2 4782

What is the result when the Web Form containing the following line is complied and executed? a) The button control is created; theEvent is the click event handler. b) Compiler error; the control must be set to runat=?server?. c) Compiler error; onClick is not a valid attribute. d) Runtime Exception; the control must be set to runat=?server?.

Syntax Softtech,

3 3376

After building the custom control, you test it by adding an ASP.Net web application to the solution. You add a correct <%@ Register %> directive and a proper declaration of the control in the tag to the Web Form, but when you execute the application you get an error. What is the most likely reason for the problem? a) The custom control must be compiled first. b) The web application must have a reference to the control c) The custom control must be registered with windows first. d) The assembly from the custom control is not in the application?s bin directory.

Syntax Softtech,

1 4162




What method must be overridden in a custom control? a) The Paint() method b) The Control_Build() method c) The Render() method d) The default constructor

Microsoft, Syntax Softtech, Icertis,

1 17782

How do you enable tracing? a) Set the Trace property of the Web Form to True b) Set the Trace property of the server object to True c) Set the Session variables Trace to True d) Set the Applications Variable Trace to True.

Syntax Softtech,

2 3418

What does the following SQL statement return, assuming that all tables and column names are correct? SELECT FirstName, StreetAddress FROM Employees JOIN AddressBook ON Employees.EmpID = AddressBook.EmpID a) Nothing, the JOIN syntax is wrong. b) All the records form the Employees table, and only the matching ones form the StreetAddress table. c) All the records from the StreetAddress table and only the matching records form the Employees table. d) Only the matching records from the two tables.

Syntax Softtech,

4 5397

What is a transaction? a) A banking term. b) A concept used to describe a step in the business process. c) A combination of DML steps that must succeed or the data is retuned to its initial state. d) A combination of DDL steps that must succeed or the data is retuned to its initial state.

Syntax Softtech,

5 4945

What object is used to encapsulate a rowset? a) DataSet b) DataAdapter c) DataRowSet d) DataTable

Syntax Softtech,

2 4222




What property is used on the datatable to indicate a conflict after an update? a) HasConflict b) HasError c) HasCollision d) HasDataError

Syntax Softtech,

1 8543

When would you not use the oleDbConnection object? a) To connect to an SQL 7.0 database. b) To connect to a DB/2 database. c) To connect to an Access database. d) To connect to an SQL 6.5 database.

Syntax Softtech,

6 5173

On what object is the transaction in ADO.NET focused on? a) The command object b) The DataSet object c) The Connection object d) The DataAdapter object

Syntax Softtech,

4 3851

What combination of methods are used to improve the speed of the fill() method of the DataAdapter? a) BeginFillData() and EndFillData() b) StartFillData() and EndFillData() c) BeginLoadData() and EndLoadData() d) StartLoadData() and EndLoadData()

Syntax Softtech, winfoware,

2 3464

You need to be able to retrieve data from DataSet object that has four DataTable objects. There are currently UniqueConstraint and ForeignKeyConstraint Object on the DataTable objects to enforce the data rules. You find that you can retrieve the data from the individual DataTable objects, but you are not able to retrieve the data from the combination of DataTable objects in a Parent/Child manner. What should you do to able to retrieve the data in a Parent/Child manner? a) Set the EnforceParentChild parameter of the DataSet to True. b) Set the EnforceRelation parameter of the Relations collection to True. c) Add DataRelation objects to the Relations Collection to make the DataSet present the data in Parent/Child manner. d) Add a primary key and a foreign key to each of the DataTable objects that should present the data in a Parent/Child manner.

Syntax Softtech,

1 1906

You need to retrieve data from a Microsoft SQL Server 2000. Currently you are using an oleDbConnection object to connect to the database server. You need to be able to retrieve the data from the database server in XML format. Which approach would be the most efficient? Select all that apply. Each answer constitutes part of the whole answer. a) Change to the SQL .NET provider. b) Use the ExecuteXmlReader() method of the xxxCommand object c) Use the DOM to create the XML document. d) Use the XmlDocument.Load() method to create the XML Document.

Syntax Softtech,

1 2714

You are using the try? catch block seen in the following code segment, but no exceptions are ever caught by the catch block. What is the problem? SqlConnection cn =new sqlConnection(strSQL); SqlDataSet ds; try { cn.open(); //perform the data processing steps ??.. } catch (OleDbException e) { ?.. } a) The exception class is wrong; it should be sqlErrors. b) The exception class is wrong; it should be sqlSyntaxExceptios. c) The exception class is wrong; it should be sqlExceptions. d) The exception class is wrong; it should be sqlExcptions.

Syntax Softtech, Microsoft,

2 3883


Post New ASP.NET Questions






Un-Answered Questions { ASP.NET }

If Instancing = Single use for ActiveX Exe, how will this be executed if there are 2 consecutive client requests ?

1273


Can we make activex dll also ti execute in some process as that of client ? How can we do?

3549


what is silver light when will we use silver light,

690


Dataset is the disconnected environment. suppose if you are binding records to gridview (disconnected environment) and you are making changes to the the grid but before updating the database if any other user modify the data, how will you avoid such problem?

789


calling result set one procedure to anothar procedure in sql2000

758






benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks

1045


what is AutoEventWireUp and what is the use of This property explain in details?

452


if i want to give an alert message like "try after sometime" to a web page which is being seen by other person.if a web page is not seen by anyone then it should display otherwise it show a display a message stating that other person is viewing so try after some time........how can i implement this.

1068


Am not able to move the controls on the form freely in asp.net 3.5 even though I selected the position as relative or absolute for those controls. What should I do to overcome this?

1224


6. Tell us about a time when you failed to meet a deadline. What were the repercussions?

1060


How to include silver light .xap page into asp.net web application and what is the purpose of using silverlight application?

1453


How can we update records in gridview?Is there any appropriate code for it?

889


1.what is the application pool. 2.what is the HttpModile and Http Handler. 3.C# 3.0 Features ? 4.Anonoymous Type,methopd and claas in 3.0? 5.difference between statsic and const ? 6.session vs application 7.state management clint side and server side ? 8.Genric list 9.c# 3.0 vs 3.5

1058


9. Why should we hire you over the others waiting to be interviewed?

1401


a web application needs to be created to accept the product name and quantity of a toy from a customer. After the customer has entered the product name the application needs to display the discounted price of the product to the customer (company is offering 35% discount on all products). The application should allow the customer to select the product name from a list box. and also while i'm data binding to a label with custom data binding with some declarations : "The Discounted Price is "+((System.Convert.todouble(lblprodprice.text)*(system.convert.todouble(txtqty.text)) - ((System.convert.todouble(lblprodprice.text)*(system.convert.todouble(txtqty.text)*0.35)). Where i need to give this declaration in asp.net 2.0.

746