Technical Interview - 2 at ILink, Chennai

You can check my previous post for Technical Round - 1 at ILink.

Here is my

Technical round - 2 with ilink,Chennai

1) How to bind the XML file to Gridview ? Explain the number of ways to bind the data.?
Ans :We can do it through the XmlDataSource using the DataFile property. You should be able to find a lot of examples around...Here's one and another here. Whilst we're talking about the XmlDataSource, note that you can also create data within the XmlDataSource, like this (very cool indeed and useful) and also programmatically, like this:

string xml = @
"<?xml version=""1.0"" encoding=""utf-8"" ?>
<Person name=""Bill Gates"" company=""Microsoft""/>
<Person name=""Sergey Brin"" company=""Google""/>
XmlDataSource1.Data = xml;

..though, just that one has to keep in mind that IF both DataFile and Data properties are set then the DataFile takes precedence and the file data is used.

Finally, yes, there is another way to provide data from file:
Using the ReadXml method of a DataSet (the DataSet, in turn, easily binds to the GridView); here's an example.


2) In windows Application if I click the X mark on top-right side or use Alt+F4 to close the window I have to have do some action like Are u sure you want to close the window like yes or no. So where shall i write the code to execute the code ?

Ans : In Windows there areForm_Closing() and Form_Closed()
Event are there so we have to write the code on Form_Closing() event -to show some message to the user before the exit or close the window.

use this in form1 contructor

this.Closing += new CancelEventHandler(Form1_Closing);
and write this event.
protected void Form1_Closing(object sender, CancelEventArgs e)
DialogResult dr = MessageBox.Show("Do you sure want to close this Application?", "Close", MessageBoxButtons.YesNo);
if (dr == DialogResult.No)
e.Cancel = true;
e.Cancel = false;

3) What is indexer in SQL ? Types of Indexer ? Explain here with example ?

An index is a physical structure containing pointers to the data. Indices are created in an existing table to locate rows more quickly and efficiently. It is possible to create an index on one or more columns of a table, and each index is given a name. The users cannot see the indexes, they are just used to speed up queries. Effective indexes are one of the best ways to improve performance in a database application. A table scan happens when there is no index available to help a query. In a table scan SQL Server examines every row in the table to satisfy the query results. Table scans are sometimes unavoidable, but on large tables, scans have a terrific impact on performance.

Clustered indexes: define the physical sorting of a database table’s rows in the storage media. For this reason, each database table may have only one clustered index.

Non-clustered indexes are created outside of the database table and contain a sorted list of references to the table itself.

4) What is the difference between stored procedures and functions?

* Functions are normally used for computations where as procedures are normally used for executing business logic.
* Functions MUST return a value, procedures doesnt need to.
* You can have DML (insert, update, delete) statements in a function. But, you cannot call such a function in a SQL query.
For example, if you have a function that is updating a table, you cannot call that function from a SQL query.
- select myFunction(field) from some table; will throw error.
* Function returns 1 value only. Procedure can return multiple values (max 1024).
*Stored Procedure: supports deferred name resolution.

Example while writing a stored procedure that uses table named tabl1 and tabl2 etc.. but actually not exists in database is allowed only in during creation but runtime throws error Function wont support deferred name resolution. Stored procedure returns always integer value by default zero. where as function return type could be scalar or table or table values(SQL Server).
Stored procedure is precompiled execution plan where as functions are not.

* A procedure may modify an object where a function can only return a value.

4)What is Webservice ? Usuage and Advantages?

I said you can write the method or function on services and call it on our application - make it fast ? but the interviewer said - for this we can place the code on Class file it also do the same work - then what the need to go for Webservice ?? I just searched a lot but I didnt get any clear answer. So this is the Answer which I got.

Web services are components on a Web server that a client application can call by making HTTP requests across the Web. ASP.NET enables you to create custom Web services or to use built-in application services, and to call these services from any client application.

It allows application written in different programming language or platform to communicate with each other.This advantage greatly help developers by reducing development time and making the connectivity easier. For communication we use XML format - because its a human and machine readable and is accepted by all platforms.SOAP - Simple Object Access Protocol - is the standard protocol to transport the XML data over networks such as internet or intranet.

Usuage ?? - I am looking for this ?

Note: If anyone find answer for Usuage of Webservice. Kindly Post your Answers here.

5) What are the Types of Authorization and Authentication?

Authorization is the process of determining the accessibility to a resource for a previously authenticated user. Note that authorization can only work with authenticated users, hence ensuring that no un-authenticated user can access the
application. The default authentication mode is anonymous authentication. There can be three types of authorization in

ASP.NET. They are

* URL Authorization
* File Authorization
* Authorization based on ACLs


Authentication is the process of determining the authenticity of a user based on the user's credentials. Whenever a user logs on to an application, the user is first authenticated and then authorized. The application's web.config file contains all of the configuration settings for an ASP.NET application. It is the
job of the authentication provider to verify the credentials of the user and decide whether a particular request should be considered authenticated or not. An authentication provider is used to prove the identity of the users in a system. ASP.NET provides three ways to authenticate a user:

* Forms authentication
* Windows authentication
* Passport authentication


6) I can't able to explain check the image you can understand?


They questioned Which Control shall i use to show the data like the (image) given above

1) I said we can use Treeview control ?

2) For this we can create paging.

7) How to filter the data from datatable ?

ie: Suppose i want the data of the particular person from the Datatable?

Note: all the data available in DataTable.(User data)

I said we can use for loop in DataRow - check and retrieve the record.

But he/She has not satisfied with my answer. They expected some easy way to do ,it seems to improve performance and also avoid by using database operations repeatedly.

The Interviewer said

Ans: is DataTable has Select Property using this we can filter the data from the datatable

dr= dt.Select("id=" + usernameTextbox.Text);

These are few question asked by the Interviewer in my second round,Initially i told i do not have indepth concepts in Database so they didn't ask more Question. But Unfortunately I wasn't clear this round. I will keep looking for Job. and also preparing for the interview.

NOTE: If anyone finds Best answers or if my answer is wrong ,Post your Answer here.Thanking You.

Related Articles

More articles: Technical Interview


Author: Deepika Haridas10 Nov 2009 Member Level: Gold   Points : 2

Hello venkatesan,

Good post!! Good attempt but do not make all headings as h1 or h2. Only main headings.

And Best Of luck for your next job!!

Thanks & Regards,

Author: krishnavenikaladi10 Nov 2009 Member Level: Gold   Points : 1

hello Venakatesan
good post .
keep sharing.....
All the Best 4 u'r next job!!

Author: venkatesan.M11 Nov 2009 Member Level: Gold   Points : 1


only for main heading i have used h1 and for side or sub heading i used h2.

Is it any wrong ?

@Krishan and @Deepika

I am still looking for the change.

Author: Dharmaraj Nagarajan11 Nov 2009 Member Level: Gold   Points : 0

Next time you will post your success story in DNS.

Author: Ajay kumar15 Nov 2009 Member Level: Gold   Points : 1

QUE How to filter the data from datatable ?

Ans For this you can use either of the following

1) Select method of datatable
2) DataView Filter method
3)Use of LINQ

Author: venkatesan.M16 Nov 2009 Member Level: Gold   Points : 0

@Ajay Thanks

If possible could post sample code snippet for each method.

Author: venkatesan.M24 Dec 2009 Member Level: Gold   Points : 1

This is Advantage of webservice

About Web Services

Author: Naveen Kumar19 Mar 2010 Member Level: Gold   Points : 1

Ajay Thanks

If possible could post sample code snippet for each method.

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: