RSS Feed IP widget

Powered By

Powered by Blogger

Wednesday, June 25, 2008

DotNet Framework Versions


(1) .NET Framework 1.0 The first release of the .NET Framework.
Was on February 13, 2002. Its helpsfull in Windows 98, NT 4.0, 2000, and XP.


(2).NET Framework 1.1
*New mobile controls are taken in ASP.NET
*Security changes -Code Access Security in ASP.NET applications is done in new ways
*A new Built-in support for ODBC and Oracle databases are comes in existing manner
*Compact framework is taken as new version for small devices *Internet Protocol
version 6 (IPv6) support *Numerous API changes.


(3).NET Framework 2.0
*Numerous API changes extend the limit
*A new hosting API for native applications wishing to host an instance of the .NET runtime. The new API gives a fine grain control on the behavior of the runtime with regards to multithreading, memory allocation, assembly loading and more (detailed reference). It was initially developed to efficiently host the runtime in Microsoft SQL Server, which implements its own scheduler and memory manager *Full 64-bit support for both the x64 and the IA64 hardware platforms
*Language support for Generics built directly into the .NET CLR
*Many additional and improved ASP.NET web controls
*New data controls with declarative data binding
*New personalization features for ASP.NET, such as support for themes, skins and webparts
*.NET Micro Framework - a version of the .NET Framework related to the Smart Personal Objects Technology initiative.

.NET Framework 3.5
*This include new features that’s are in C# 3.0 and VB.NET 9.0
*Also have support for expression trees and lambda method
*Language Integrated Query (LINQ)
*LINQ to Objects
*LINQ to XML
*LINQ to SQL
*Also include new feature in ADO.NET that is paging *ADO.NET synchronization API to synchronize local caches and server side datastores *Peer-to-peer networking stack, including a managed PNRP resolver[17] *Managed wrappers for WMI and Active Directory APIs[18]
*Enhancements to the WCF and WF runtimes that let WCF work with POX and JSON data, as well as expose WF workflows as WCF services.[19]
*Support for HTTP pipelining and syndication feeds.[19] *ASP.NET AJAX is included

.Net Framework 2.0 Advantages
The .Net Framework (version 2.0) includes 51 assemblies.The .Net Framework (version 2.0) includes 18,619 types; 12,909 classes; 401,759 public methods; 93,105 public properties and 30,546 public events.It includes a new feature called Control State. Control state is similar to view state except that is used to preserve only critical information. For example the gridview control uses control state to store the selected row. Even if you disable the viewstate, the gridview control remembers which row is selected.We can precompile an entire ASP.Net application by using the aspnet_compiler.exe command line tool. If you precompile an application, users do not experience the compilation delay resulting from the first page request.

Saturday, June 21, 2008

ADO. NET

Question:-How ADO.NET come into existence ?

Answer: DAO (data access model) is the first Data Access Model that is created for local databases which contains built-in Jet engine which overcome with some problem like performance and functionality issues. After this RDO (Remote Data Object) and ADO (Active Data Object) comes in market which basically designed for Client Server applications but soon ADO is more comfort then RDO. ADO a good architecture. ADO contained all the data in a recordset object which creates problems when implemented on the network where firewalls exist. Because ADO was a connected data access, which make connection open until the application is closed. This creates issue like database security and network traffic. Because open database connections use system resources to a maximum extent making the system performance less effective. This helps in developing of ADO.NET.


Question: What is Asynchronous Database Commands ?

Answer:- When we execute any database. Thread that executing the command waits before the command get fully executing before executing any additional code. Thread is blocked for another process. But Asynchronous Database Commands solve this problem when database command is executing the current thread can continue on other process.Thread can execute a no of database command. There are two benefits of using Asynchronous Database Commands.1) Executing Multiple Databse Commands simultaneously improve performance.2) Because ASP.Net framework uses a limited pool service for request. Whenany request for a page is comes its assign a thread to handle the request. If framework is out of thread then job is in gueses we get error 503. But if we are using asynchronous database command then current thread is release back to current thread pool.


Question:-What is Concurrency and its types?

Answer: When two or more people try to update same type of data then Concurrency helps how to handle this situation there are two types of concurrencyPessimistic:-When one user try to change the data with pessimistic concurrency a lock is placed on the data so that another user cannot change that one after one another can change.Optimistic:-In this if two user works on the same data and one change that data first then second user cannot change that same data becasue the which he have using is allready changed so he cannot do the change becasue change apply to another data that is changed by first user.


Question: How to start Outlook,NotePad file in AsP.NET with code ?
Answer: Here is the syntax to open outlook or notepad file in
ASP.NET VB.NET Process.Start("Notepad.exe") Process.Start("msimn.exe");
C#.NET System.Diagnostics.Process.Start("msimn.exe"); System.Diagnostics.Process.Start("Notepad.exe");


Question: How to get result from two table in SqlDataReader ?

Answer: string str="Select * from table1;Select * from table2"; cmd.commandtext=str; dr=cmd.executereader();


Question: What is Ref Cursor in .NET and how it is link with ExecuteReader ?
Answer: Ref cursor play its role when doing with the oracle database these comes in ODP.NET. Ref Cursors are objects that link to Oracle server-side cursors.These Ref Cursor can be converted in oracle datareader with this Ref cursor we can get result with query written to pl/sql and the result can be get in .net.Now the question arise why we use Ref Cursor when we have an option of ExceuteReader reson is simple when we need more query in pl/sql means our work is done in pl/sql then we need this ref cursor for getting result set because doennot have direct connection to that table.Becasue advantage of pl/sql we can take two opertion in one query.


Question: Define tool Manage Statistics in SQL Serevr 2000 query ?

Answer: SQL Server creates internal statistics on the rows in all of our tables that is used by the Query Optimizer to select the optimal execution plan for our query. And Query Optimizer helps in doing this.Soome time when statistics isnot maintains then this is done by tool Manage Statistics.We can add,edit or delete for statistics that is maintained by SQL Server.We can experiment with different sets of statistics and see how it affects the query otimizer execution plans.


Question: Some important instruction regarding ADO.NET connection string ?

Answer: When we are making connection string always use Server's IP address not the DNS name if we use IP address it will reduce the time taken for connection to establish.Becasue server IP address is used to get a default or named instance of Sql Server that ls running. if we are running the cluster we have to use the Virtual SQL Server IP address.


Question: How to get database schema information when connection object is establish in ADO.NET ?
Answer: There is a method that helps in getting schema information that is GetSchema() and this method is called in three different ways first way when we call this method without any parameter its return the metadata(table, view, stored procedure.indexes etc).When method is called by passing metadata collection name and filter criteria returns the items from the collection after applying the filter criteria and last way is when we called by passing a metadata collection name returns information about items found in the specified collection.


Question: Which one is better WebService and Remoting ?

Answer: Both of these have little difference WebService helpfull where the user who is using WebService doesnot have the .NET plateform. On the otherside for remoting we need .Net plateform on the both side so from both of this remoting is faster then webservice.So keep in mind which of these are you using if you have .net plateform or other.


Question:-What is DataGrid wheater its a Server Control or something else ?
Answer:DataGrid is Web server control a powerful tool for displaying information from a data source. we can display editable data in a professional-looking grid by setting only a few properties. The grid has a sophisticated object model that provides you with great flexibility in how you display the data.


Question:-Define different execute methods of ADO.NET command object ?
Answer: ExecuteScalar:- This method returns a single value from the first row and first column of the result get from the execution of SQL query.
ExecuteNonQuery:- This method executes the DML SQL query just like insert, delete or update and then returns the number of rows affected by the action.
ExecuteReader:- This method returns DataReader object which is a forward-only resultset.
ExecuteXMLReader:- This method is available for SQL Server 2000 or later. Upon execution it builds XMLReader object from standard SQL query.


Question:-What DataReader class do in ADO.NET ?
Answer:To get read-only and forward only access to data we use DataReader .the DataReader object reduces the system overhead because one row at a time is taken into memory so it is quite lightweight. To get second object connection is reconnected. We can create a DataReader object by execute Execute readre() method. There are two Data Reader class one is SqlDataReader and other is OleDbDataReader.


Question:-Why is ADO.NET serialization slower than ADO ?
Answer: ADO uses binary serialization while ADO.NET uses text based serialization. Since the text takes more space, it takes longer to write it out.


Question:-Is XML is a component of ADO.NET ?
Answer: The answer of this question is always Yes because XML is an important component of ADO.NET architecture .ADO.NET use XML to store and transfer data.We not have to convert data to XML format.Datasets helps XML to integrate with ADO.NET. XML schema plays a role to get table definition,column,datatypes and constraints helps DataSet.


Question:- How to check if the Dataset has records ?
Answer: if ds.Tables(0).Rows.Count= 0 then 'No record else 'record found


Question:- What is the significance of CommandBehavior.CloseConnection ?
Answer: To avoid having to explicitly close the connection associated with the command used to create either a SqlDataReader or and OleDbDataReader, pass the CommandBehavior.CloseConnection argument to the ExecuteReader method of the Connection.dr= cmd.ExecuteReader(CommandBehavior.CloseConnection); The associated connection will be closed automatically when the Close method of the Datareader is called. This makes it all the more important to always remember to call Close on your datareaders.


Question:-Which method do you invoke on the DataAdapter control to load your generated dataset with data?
Answer: The Fill() method.


Question:-What is Dataset and Diffgram?
Answer: When sending and retrieving a DataSet from an XML Web service, the DiffGram format is implicitly used. Additionally, when loading the contents of a DataSet from XML using the ReadXml method, or when writing the contents of a DataSet in XML using the WriteXml method, you can select that the contents be read or written as a DiffGram. For more information, see Loading a DataSet from XML and Writing a DataSet as XML Data. While the DiffGram format is primarily used by the .NET Framework as a serialization format for the contents of a DataSet, you can also use DiffGrams to modify data in tables in a Microsoft SQL Server™ 2000 database.


Question:-What is typed dataset ?
Answer: A typed dataset is very much similar to a normal dataset. But the only difference is that the sehema is already present for the same. Hence any mismatch in the column will generate compile time errors rather than runtime error as in the case of normal dataset. Also accessing the column value is much easier than the normal dataset as the column definition will be available in the schema.


Question:-How can you provide an alternating color scheme in a Repeater control?

Answer: AlternatingItemTemplate Like the ItemTemplate element, but rendered for every other row (alternating items) in the Repeater control. You can specify a different appearance for the AlternatingItemTemplate element by setting its style properties.


Question:-What are good ADO.NET object(s) to replace the ADO Recordset object?
Answer: There are alot...but the base once are SqlConnection, OleDbConnection, etc...


Question:-Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?

Answer:Valid answers are:
A DataSet can represent an entire relational database in memory, complete with tables, relations, and views.
A DataSet is designed to work without any continuing connection to the original data source.
Data in a DataSet is bulk-loaded, rather than being loaded on demand.
There's no concept of cursor types in a DataSet.
DataSets have no current record pointer You can use For Each loops to move through the data.
You can store many edits in a DataSet, and write them to the original data source in a single operation.
Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources.




Question:-What are the differences between Datalist DataGrid and datarepeater ?

Answer:DataList

  1. Has table appearence by default

  2. Has no autoformat option

  3. has no default paging & sorting options

  4. can define separators between elements using templateDataGrid

  5. Has a grid appearence by default

  6. has a autoformat option

  7. has default paging and sorting

  8. has no separator between elementsDataRepeater

  9. simple,read-only output, has no built in support for selecting or editing items, has no DEFAULT APPEARENCE, has no default paging.

Welcome

Welcome to dotnet, an infomative website which provides knowledge all about ASP.Net, dot net interview questions, dot net questions basic and dot net faq. No matter you are student, employee or employer if you are in the field of .Net and need help on any topic regarding ASP.Net just ask it here we will provide you the best answer of your question. Neither you have to log in nor you have to signup, ask with a single click.

Wednesday, June 18, 2008

OOPS

Question: What Is OOPS ?
Answer: OOPs is an Object Oriented Programming language,which is the extension of Procedure Oriented programming language.OOPS reduce the code of the program because of the extensive feature of Polymorphism. OOPS have many properties such as Data-Hiding,Inheritence,Data Absraction,Data Encapsulation and many moreEverything in the world is an object. The type of the object may vary. In OOPS, we get the power to create objects of our own, as & when required.

Question: what is Class ?
Answer
:A group of objects that share a common definition and that therefore share common properties, operations, and behavior. A user-defined type that is defined with the class-key 'class,' 'struct,' or 'union.' Objects of a class type consist of zero or more members and base class objects.Classes can be defined hierarchically, allowing one class to be an expansion of another, and classes can restrict access to their members.

Question: What is Constructor?
Answer:When we create instance of class a special method of that class, called that is constructor. Similarly, when the class is destroyed, the destructor method is called. These are general terms and usually not the actual member names in most object-oriented languages. It is initialized using the keyword New, and is destroyed using the keyword Finalize.

Question: What is Abstract Class ?
Answer:Classes that cannot be instantiated. We cannot create an object from such a class for use in our program. We can use an abstract class as a base class, creating new classes that will inherit from it. Creating an abstract class with a certain minimum required level of functionality gives us a defined starting point from which we can derive non-abstract classes. An abstract class may contain abstract methods & non-abstract methods. When a class is derived from an abstract class, the derived class must implement all the abstract methods declared in the base class. We may use accessibility modifiers in an abstract class.An abstract class can inherit from a non-abstract class. In C++, this concept is known as pure virtual method.

Question: What is ValueType?
Answer:Value Types - Value types are primitive types. Like Int32 maps to System.Int32, double maps to System.double.All value types are stored on stack and all the value types are derived from System.ValueType. All structures and enumerated types that are derived from System.ValueType are created on stack, hence known as ValueType.In value type we create a copy of object and uses there value its not the original one.

Question: What is diff. between abstract class and an interface?
Answer: 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.