1. Web service support
a) Data set
b) dataReader
c) both of above
d) none of above
a) Data Set
Web service support Data Set and not support data reader
You can have template column for select and delete instead of the databound column. In which you can mention the destination page where you need to navigate.
Using RowDataBound event, you can add attribute to the select and delete hyperlink like:
e.Row.Cells(CellPosition).Controls(0).Attributes.Add("OnClick","return fnJavascriptFunction()")
e.Row.Cells(CellPosition).Controls(0).Attributes.Add("OnClick","return fnJavascriptFunction('"& If any argument &"')").
3. What types of data validation events are commonly seen in the client-side form validation?
Required Field Validator
Requried Filed Validator,Compare filed validator
1. Session Object
2. Application Object
3. Server Object
4. Request Object
5. Response Object
6. Object Context
7. Error Object
5. ColumnMapping belongs to which namespaces?
ColumnMapping belongs to which namespaces
system.data.common
Server.Transfer is used when redirecting the webpage with in the same applicationwhereasResponse.Redirect is applicabletowards the redirection of webpage between 2 applications
Response.Redirect will instruct browser to call a particular webpage.This will increase one request and one response between the client and server.
7. What is PreProcessor in .NET and type, where it use?
The pre-processing directives provide the ability to conditionally skip sections of source files, to report error and warning conditions, and to delineate distinct regions of source code. The term "pre-processing directives" is used only for consistency with the C and C++ programming languages. In C#, there is no separate pre-processing step; pre-processing directives are processed as part of the lexical analysis phase.
A preprocessor directive must be the only instruction on a line. Preprocessing directives are lines in your program that start with `#'. Whitespace is allowed before and after the `#'. The `#' is followed by an identifier that is the directive name. For example, `#define' is the directive
Types are:
#if, #else, #elif, #endif, #define, #undef, #warning, #error, #line, #region, #endregion
They are used for:
Conditional compilation
Line control
Error and Warning reporting
For example u can refere the MS site ...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csspec/html/vclrfcsharpspec_2_5_4.asp
8. Please brief not about XSD,XSLT & XML?
XSD stands for XML Schema Definition.It define the structure of the XML file and the elements and attributes it contains.The datatype of the elements.So that when u populate XML data into dataset, the dataset can treat elements differently based on their type.If XSD is not present dataset treats all elements as string type. XSLT stands for XML style sheet lang tranformation.It is lang used for transforming XML data in one format to another format.Example XML data into HTML format. XSLT uses XPath to identify the elements in XML doc and transform those to desired format
9. List of Words of PreProcessor in .NET?
#if
#else
#elif
#endif
#define
#undef
#warning
#error
#line
#region
#endregion
Main use of directives
If we remove the web.config file from the application it will work.
unless it doesnt have the things like connectionstring etc.
11. How to reduce the width of textbox in EditCommandColumn of DataGrid?
convert textbox column into a template then it lets you change its width
12. Which dll handles the request of .aspx page?
When the Internet Information Service process (inetinfo.exe) receives an HTTP request, it uses the filename extension of the requested resource to determine which Internet Server Application Programming Interface (ISAPI) program to run to process the request. When the request is for an ASP.NET page (.aspx file), IIS passes the request to the ISAPI DLL capable of handling the request for ASP.NET pages, which is aspnet_isapi.dll.
13. Explain What is event bubbling?
Event Bubbling is nothing but events raised by child controls is handled by the parent control. Example: Suppose consider datagrid as parent control in which there are several child controls.There can be a column of link buttons right.Each link button has click event.Instead of writing event routine for each link button write one routine for parent which will handlde the click events of the child link button events.Parent can know which child actaully triggered the event.That thru arguments passed to event routine. " Happy programming"
14. What is server infrastructure & Server components?
Component product of Windows Server System is effective on its own, as individual components and as part of an integrated system. To provide a framework for Windows Server System product improvement, Starting with the infrastructure server product releases for 2005, with a vision of delivering a common set of services across all Windows Server System products.
All Windows Server System products will provide infrastructure built on the Volume Shadow Copy Service to support fast backup and recovery of data. Each Windows Server System product team will develop a Volume Shadow Copy Service writer. Volume Shadow Copy Service is a framework for facilitating communication among applications, storage subsystems, and storage management applications (including backup applications) to define, persist, and exploit point-in-time copies of storage data.
This infrastructure will provide backup/restore to product solution providers to reduce their cost of product development
and enable IT administrators to provide their organizations with fast backup and recovery of data at reduced costs.
15. What is IPostBack? How to use it?
Gets a value indicating whether the page is being loaded in response to a client postback, or if it is being loaded and accessed for the first time.
Property Value
true if the page is being loaded in response to a client postback; otherwise, false.
void Page_Load() {
if (!IsPostBack) {
// Validate initially to force asterisks
// to appear before the first roundtrip.
Validate();
}
}
<?xml version="1.0" encoding="utf-8" ?>
<!-- Web.Config Configuration File -->
<configuration>
<appSettings>
<add key="ConnectionString"
value="server=localhost;database=Northwind;uid=sa;password=secret;" />
</appSettings>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Imports System
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Public Class ConnString : Inherits Page
Protected dataGrid As DataGrid
Protected Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs)
Dim sqlConn As SqlConnection
Dim sqlCmd As SqlCommand
Dim strConnection As String
Try
'Get connection string from Web.Config
strConnection = ConfigurationSettings.AppSettings("ConnectionString")
sqlConn = New SqlConnection(strConnection)
sqlCmd = New SqlCommand("SELECT * FROM Customers WHERE " _
& "(CompanyName LIKE 'A%') OR (CompanyName LIKE 'B%')", sqlConn)
sqlConn.Open()
dataGrid.DataSource = sqlCmd.ExecuteReader()
dataGrid.DataBind()
Catch ex As Exception
Response.Write(ex.ToString & "<br>")
Finally
sqlConn.Close()
End Try
End Sub
End Class
An abstract class and Interface both have method only but not have body of method.The difference between Abstract class and An Interface is that if u call Ablstract class then u have to call all method of that particular Abstract class but if u call an Interface then it is not necessary that u call all method of that particular interface.Method OverLoading:-Return type, Parameter type, parameter and body of method number may be different.Method Overriding:- Return type, Parameter type, Parameter Number all must be same . Only body of method can change.
Previously, before .NET, this used to be a major issue. "DLL Hell" refers to the set of problems caused when multiple applications attempt to share a common component like a dynamic link library (DLL) or a Component Object Model (COM) class. In the most typical case, one application will install a new version of the shared component that is not backward compatible with the version already on the machine. Although the application that has just been installed works well, existing applications that depended on a previous version of the shared component might no longer work. In some cases, the cause of the problem is even more subtle. In many cases there is a significant delay before a user discovers that an application has stopped working. As a result, it is often difficult to remember when a change was made to the machine that could have affected the application. A user may remember installing something a week ago, but there is no obvious correlation between that installation and the behavior they are now seeing. The reason for these issues is that version information about the different components of an application aren't recorded or enforced by the system. Also, changes made to the system on behalf of one application will typically affect all applications on the machine.
19. What is CLR? Diff between CLR & CTS?
CLR is the Common Language Runtime for the dotnet frame work.
CTS is the Common Type Sytem for all languages.It consists of the types(Class,Enums,Structs,Interfaces etc for any language)
CTS is one of the component of CLR.
CLR is the Runtime Engine which provide services to execute the application.CTS is part of CLR
20. Which namespace is used to get assembly details?
System.Assembly is the namespace which u need to include in u r program to get the assemply details.To get the assemply details of the current running one is thru reflection so u need another namespace calledSystem.Reflection "Happy Programming"
21. How does u get record no from 5 to 15 from a dataset of 100 records?
// ds-> daata set
//dr as datarow
for i=5 to 15
{
dr=ds.table.row(i)
}
You can also archive using this syntax. sqlconnection con=new sqlconnection(""); Sqldataadapter da=new Sqldataadapter("T-SQlQUARy",con); dataset ds=new dataset(); da.Fill(ds,5,15,"tablename");
22. How do u declare static variable and how it is declared and what is its lifetime?
By using keyword static before the variable name. Static variable retains the same data throughout the execution of a program.
23. Explain DIff. between Friend and Protected Friend?
Friend access provides access to member with in the namespaces .The protected friend gives specifies access to the member with in the namespace and the derving classes.
COM components are accessed from the .NET runtime via a Runtime Callable Wrapper (RCW). This wrapper turns the COM interfaces exposed by the COM component into .NET-compatible interfaces
25. Trace and Debug belongs to which namespaces?
System.Diagnostics
If you are developing an intranet app and you want to display the current stock price of your company, its best to consume a webservice the provide that service. IOW, when you want to get 'outside' data throuh a corporate firewall
If, say, you want to display latest news from HR deartment in your portal, better to have a .NET DLL that connect to corporate HR Database and get the info.
27. Explain What is an abstract class?
An abstract class is one in which methods are defined but an object of this class cannot be instanstiated.this type of a class can only be derived but cannot be instantiated.
28. What method do you use to explicitly kill a user s session?
session.abandon-to kill all
session.remove-to spec item
29. Can you edit data in the Repeater control?
A Repeater control is a light weight control which can be used for simple reporting purposes. It supports basic event-handling like Init, Load, Unload etc., This also supports some basic formatting of data and can be presented to the user. A Repeater control offers limited level of data editing or selecting capabilities. For such editing and updates ASP .Net offers DataList and DataGrid controls.
30. In order to get assembly info whcih namespace we should import?
System.reflection
31. What is the root namespace for all types?
System is the root of al the namespace in .net
32. Explain Diff. betn Dataset and Recordset?
DataSet can be considered as a logical database as it has the capability to store more than one table and have relations maintained between the tables as in a relational database. Where as a RecordSet can hold only one table at a time.
33. Explain Diff between Dataset and Datareader?
Dataset is used to store the data, it contains collections of Datatable.
Datareader is used to connect to the database for retrieving data.
.NET remoting provides a framework that allows objects to interact with one another across application domains. The framework provides a number of services, including activation and lifetime support, as well as communication channels responsible for transporting messages to and from remote applications.for further info refer MSDN
35. Explain What is an assembly?
Assembly is a collection of code files , types and resources. It is a unit of deployment,version cotrol and reuse.Assembly is basically collection of exe or dll files which are generated upon successfull compilation of the .Net application