Web Farm is a multi server scenario and Web Garden is a multiprocessor scenario.
2) Session is best in WebGarden Scenario?
Only Session with Staemode useful in Web Garden Scenario
3) Three differences between PrimaryKey and UniqueKey.
1. Primary key is only one in table while unique key can be multiple
2. Unique key can be null
3. By default cluster index create on primary key while non cluster index can be created on non cluster index.
3)What is Currency Control?
4) Where we use Currency Control?
a) Forms b) Control c) Both d) None
5)What is the use of Server.Execute?
6) Default in web.config file.
Answer : Anonymous access
7)Do we need to stop IIS before installing new version of an assembly?
Answer : No
8)Which file is used to define Resource Info ?
a) Web.config b) Global.asax c) Both d) None
Answer : A resource file is an XML file that can contain strings and other resources, such as image file paths. Resource files are typically used to store user interface strings that must be translated into other languages. This is because you can create a separate resource file for each language into which you want to translate a Web page.
Resource Info is defined in Resource file. Resource file extension is .resx.
9)If you want to get Forms Collection what will you use?
a) Response.Redirect b) Server.Transfer c) Server.Execute d) None e) All
Answer : Request.Form
10)Thread is an
a) Event b) Object c) Instance Method d) Static Method
11)Which can not be new?
a) DataReader b)DataTable c) DataRow d) DataColumn
Answer : DataRow can’t be new it is used as
DataRow objDtRow = objTable.NewRow();
System.Data.SqlClient.SqlDataReader obj = new System.Data.SqlClient.SqlDataReader();
DataColumn idColumn = new DataColumn();
DataTable table = new DataTable();
There is no DataReader class in ADO.NET, but there are a number of classes that implement the IDataReader interface:
12)How will you bind a text box with dataview?
Answer : None
textBox1.DataBindings.Add("PropertyName", "DataSource", "DataMember");
textBox1.DataBindings.Add("Text", "ds", "EmpName");
13)Which is wrong?
a) You can find data in dataview if dataview is sort only.
b) Dataview is a subset of rows and columns.
14) ConnectionPool access in case of
a) Connection Close b) Connection Dispose c) Connection Life time expired d) All
Answer : Whenever a user calls Open on a connection, the pooler looks for an available connection in the pool. If a pooled connection is available, it returns it to the caller instead of opening a new connection. When the application calls Close on the connection, the pooler returns it to the pooled set of active connections instead of closing it.
Connections are released back into the pool when they are closed or disposed.
Only connections with the same configuration can be pooled. ADO.NET keeps several pools at the same time, one for each configuration. Connections are separated into pools by connection string, and by Windows identity when integrated security is used. Connections are also pooled based on whether they are enlisted in a transaction. When using ChangePassword, the SqlCredential instance affects the connection pool. Different instances of SqlCredential will use different connection pools, even if the user ID and password are the same.
Do not call Close or Dispose on a Connection, a DataReader, or any other managed object in the Finalize method of your class. In a finalizer, only release unmanaged resources that your class owns directly. If your class does not own any unmanaged resources, do not include a Finalize method in your class definition. For more information, see Garbage Collection.
15) Pessimistic lock used when
a) High Contention
b) Lock cost is low than Rollback
c) Lock cost is high than Rollback
Answer : High Contention
16) Session objects are accessible in?
a) web forms b) 2. web Garden c) both d) none
Answer. Session with InProc can’t be use in both while Session with Statemode can be use in both.
17) Application objects are accessible in?
a) web farm b) Web Garden c) both d) none
Answer. If you are on a farm, there will different Application variable instances per server. For Session variables, there is no guarantee that a user will return between requests to the same server, so you have to serialize and store session data in a single repository, like SQL Server.
Same for Web Garden
18)Which control have the paging?
a) dataset b) datareader c) None d) All
Answer. Dataset and Datareader are database object they don' t have paging property.If you want paging than you need to use gridview, formview or repeater .net control.you can assign Dataset or Datareader as as datasource for this control.
19) Which file contains the configuration settings for URI to access in web services?
Answer. .disco (check it once)
20) I have a datagrid/Gridview can i have a dropdown inside a column and binding to different dataset?
Answer : Yes, using template field
21) How will you fill a dropdown from another dataset and grid from another dataset.
Answer: Fill the grid first than on RowDatabound event find the combo control and bind it with another dataset.
22) How will you add increasing number (index numbers of rows) in datagrid without bringing it from database.
Answer : using rowdatabound
23) Suppose there are two buttons in a datagrid column. How will you identify which button is clicked?
Answer : using command name and command argument
24) How many nulls unique key can have?
Answer : Only one
25) Can we define unique key on combination of keys?
Answer : yes