Explain virtual function in c# with an example
When using code behind pages, which library must access file import from ASP.Net environment
ASP.Net uses two ways/techniques of coding pages 1) Inline code2) Code behind 1) In Inline code,code is directly embedded directly within asp.net aspx page.2) In code behind technique we hav...
Inherits System.Web.UI.Page
How do you post a current page to different aspx page?
Responce.Redirect("Newpage.aspx",false);
protected void Page_Load { Response.Redirect("webform.aspx&...
How does the cookies work in ASP.Net?
I want to know the complete follow of the page how it store cookies and user info into session and when it get terminate also is it possible to call in-process application to out-process?
Answered by: Prabhat Chauhan
View all answers by Prabhat Chauhan
Member Since Jul-2008 | Answered On : Jul 23rd, 2008
we know Http is an state-less protocol which is required for interaction between clinet and server .
so there is an need to remeber state of request raised by an web browser so that
web server can recognize you have already previously visited or not.
There are two types of state management techniques:
a) Client side state management
b) Server - side statemanagement
Using cookies comes under clinet side statemanagement .In HttpResponse we write
Cookie containing sessionId and other information within it.
when a browser made a request to the web server the same cookie is sent to the server where server recognize the session id and get other information stored to it previously.
Cons:
1)Cookie should contain non sensitive data as one can easily read cookies and they result of which your security may be tampered .
2) Cookie should not contain large amount of information as they are sent back and forth with request and response in between client and server which may cause your
Performance degradation
we know Http is an state-less protocol which is required for interaction between clinet and server .so there is an need to remeber state of request raised by an web browser so that web server can reco...
.NET FRAMEWORK AS 2 COMPONENTS
1. CLR(common language runtime)
2. base class library
- it manages the execution of pgms on cpu
- provides an run time environment for all the .net applications
- also it provides memory management, garbage collection, security
What is the difference between .Net framework and .Net compact framework?
Answered by: bb.geetha
Member Since May-2008 | Answered On : Jun 12th, 2008
The .NET Compact Framework is a subset of the .NET Framework designed for small-footprint devices. It includes most, but not all of the base class library available in the full framework.
The .NET Compact Framework is a subset of the .NET Framework designed for small-footprint devices.
DataREader is ued for readonly and forward .
Dataset is used to either read and Write
Whenever sequential is read needed then you can go for DtaREader , it gives better performance than DataSEt.
Using DataSEt you can get entire relationship of the tables and schema.
Answered by: bb.geetha
Member Since May-2008 | Answered On : Jun 12th, 2008
A Partial class is a class that can be split into two or more classes. This means that a class can be physically separated into other parts of the class within the same namespace. All the parts must use the partial keyword. All the other classes should also have the same access modifier. At the compile time, all the partial classes will be treated as a single class. Let us list some advantages of having partial classes.
Partial class is a new feature added to .NET Framework 2.0. .NET 1.0 or 1.1, does not support for partial classes. It is possible to split the definition of a class or a struct, or an interface over t...
The class having partial keyword and same name. One class can split into more than two parts having same name and partial keyword. In the time of object creation all partial class group together to ma...
A query string is the part of a Uniform Resource Locator (URL) that contains data to be passed to web applications.
query string is not stored somewhere it is visible in user browser.
What is the difference between excute query and excute nonquery.?
: execute query is used for DDL commands whereas execute nonquery for DML.
In ADO.net for Command Object you have 3 methods
1.ExecuteReader - Select statements
2.ExecuteNonQuery - DML statements(Insert,Update and Delete) - Returns Number of rows affected
3.ExecuteScalar - Returns a single value from Aggregate functions like SUM,AVG,COUNT etc
Editorial / Best Answer
Answered by: bb.geetha
View all answers by bb.geetha
Member Since May-2008 | Answered On : Jun 6th, 2008
Virtual functions implement the concept of polymorphism are the same as in C#, except that you use the override keyword with the virtual function implementaion in the child class. The parent class uses the same virtual keyword. Every class that overrides the virtual method will use the override keyword.
What : Virtual Function is used to have polymorphic Effe...
It has override keyword in the child class and the base class containing the virutual keyword.