.NET Interview Questions Part-IX



  1. How to customize the site color? Default color given by Microsoft is Blue, how to change the color to red?
  2. How to stop providing delete option when creating a user?
  3. Diff b/w WSS and portal server?

Ans: WSS- created on IIS, SQL server and windows 2003 Operating system

                – Single site

         SPS – Collection of sites (intranet)

–         It is created on IIS,SQL server and windows 2003 Os and on WSS

      Then what is the difference b/w WSS and a web application?

  1. Share point web part namespace and what is the base class for a Share point web part.

Ans: Microsoft.Sharepoint.webpartpages.webpart

  1. How to communicate b/w two web parts?

Ans: IRowConsumer, IRowProvider, Icolumnconsumer, IColumnProvider, Transformer

  1. How did u used Sharepoint web parts and ASP.NET 2.0 web parts?
  2. What is the file name extension for custom web controls? Is it a dll or ascx or aspx?
  3. Sharepoint Object model?
  4. What are the components of Sharepoint object model?

Ans: IIS,Windows server 2003 ,Visual studio, SQL server

10.  What are the databases that are created by Sharepoint?How are they used?

Ans: Portal server name_prof,_site,_server and a config database

11.  Share point installation?

12.  UI layer is present in one server, DAL in one server and BLL in another server, how to communicate b/w them?

13.  Session state will be stored in one server and application in one server, how to link them?

14.  How do u provide security for web parts?

Ans: <trust level=”WSS minimal”> and using safe control

15.  New features in SQL server 2005

16.  Windows authentication in web.config file. What is the internal concept behind their implementation? Hint: Active directory services

17.  What are the basic methods to be overloaded while creating a web part?

Ans: CreateChildControl, Render web part(this method used HTMLTextWriter)



  1. Two parameters are doing manipulations on the same record of a dataset in .NET. How to prevent accessing the same record simultaneously?
  2. If you want another transaction to happen asynchronously without waiting for the previous transaction to complete, how you can achieve this in .NET?

Tip: Create each transaction in one thread.

  1. ASP.NET roles and membership? What are the default providers?

In Solution explorer 4th tab GUI is Asp.net Membership Configuraion wizard

It will create sps , tables . We can create Users|Roles|Server|Providers. If this GUI is corrupted how you will customize roles and memberships through code?


  1. How to deploy windows application in live server?

Ans: Setup and deployment projects and cute FTP

  1. Have you done deployment through wizard?
  2. What is the diff b/w Cache and cookie?
  3. C# 2.0 generics?We can go for overloading then why do we need generics?
  4. what is the namespace that is to be included in .NET for using transactions?
  5. Where the viewstate values are getting populated in the page life cycle?

Ans: LoadViewstate event

10.  How to write code that should identify whether the framework is installed or not?

11.  How to publish a web application in Asp.net 2.0? How to deploy in Live Server?

What are the publishing tools that are provided in Asp.net 2.0? How to customize that deployment process?


SQL server


  1. Create view syntax?
  2. Complicated query which I had written till now?
  3. Self join?
  4. Types of joins?
  5. If your query performance is getting reduced how to solve the problem?
  6. Uses of cursors?
  7. Types of indexes?
  8. Can we create clustered index on a table which is not having primary key?
  9. Diff b/w SP and function?

10.  Can we create views on multiple tables? If we take insert statement in which table will it show effect?

11.  Diff b/w Union and Union ALL?

12.  Types of authentication in SQL server?

Ans: Mixed and windows

In aspx page connection string initial catalog=”SSPI” is used for windows authentication. Which one is best? Ans: windows authentication because it depends on active directory services

13.  Diff databases are there in SQL servers if you are specifying windows authentication in connection string then can u connect to any database of a SQL server?

Ans: No First you should have permission on the particular database in the SQL server





  1. 4 clients are connected to DB sevrrr.Another client need to connect to SQL server.How to do SQL server registration?

Ans: Add user registration in Enterprise manager

  1. .Net framework, CLR?
  2. Diff b/w ASP and ASP.NET?
  3. Joins, Triggers, DTS?
  4. Interface and abstract class and their real time usage?
  5. Overloading/Overriding
  6. int add(int a,int b)

float add(int a,int b)Is this overloading or overriding?

Ans: Overloading

  1. Exception handling in SQL

Ans: @@error, @@rowcount, sp_addmessage, raiseerror

  1. viewstate,concurrency,transaction

10.  Data grid rendering.How the events are fired in datagrid?(Events sequence)

Ans: Itemdatabound,EditItem,UpdateItem

11.  default base class : System.object

12.   User defined controls and custom web controls

13.  HTMl controls and ASP.NET web controls,if we use runat=”server”  for HTMl controls what happens?

14.  Diff b/w viewstate and control state?

15.  what is auoeventwireup?

16.  Typed dataset and untyped dataset?

17.  Diff b/w drop truncate and delete?

18.  Diff b/w persistent cookie and temporary cookie?

19.  Session storage- inproc,outproc and SQL server





  1. In 1.aspx.cs file we have namespace with two classes and two page loads. Is it possible to have two page loads?

Ans: Yes it is possible.

In aspx HTML page source code see the Page Directive

<@Page codebehind = 1.aspx.cs inherits = “Class A”>

So it inherits. You can mention class name. So if you have two page loads also no problem.


 Sample Code:

Namespace Project1.Form



  Public Class A



    Public void Page_Load()






  Public Class B




     Public void Page_Load()








  1. We are having UI code in one server. BLL in one server and DAL layer in another application server. How to link UI layer with BLL layer ?

Ans: Use WebFarm and WebGardening concept


  1. What is Composition , Aggregation in UML?

Ans: Suppose


Aggregation : HardDisk, Speakers, CPU, Monitor

        Can exists without others. They are independent

Composition: With a record in Invoice an Invoice bill cannot exists.


  1. How you implement composition through coding?

 Question : Class B cannot exist without Class A

Class A




Class B




Ans: use nested classes.  Ie Domain, SubDomain

Class A



Class B







  1. Self Join:


Employee : Create table Employee (empid int,  mngid int, empname varchar(50))

EmpId DepId EmpName
1 4 Somu
2 4 Ranjit
3 4 Sreedhar
4 Null Hannan
5 2 Srinivas
6 2 Uppu
7 3 Shanti


Expected o/p:

EmpId HeadName EmpName
2 Ranjit Srinivas
2 Ranjit Uppu
3 Sreedhar Shanti
4 Hannan Somu
4 Hannan Ranjit
4 Hannan Sreedhar


Then query is :


Select a.empid, a.empname as headname , b.empname from employee a join employee b on a.empid = b.depid


Expected O/P:

EmpId Headname EmpName
1 Hannan Somu
2 Hannan Ranjit
3 Hannan Sreedhar
5 Ranjit Srinivas
6 Ranjit Uppu
7 Sreedhar Shanti


Then Query is:


Select a.empid, b.empname as Headname ,a.empname from Employee a join Employee b on a.depid = b.empid


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: