Escolar Documentos
Profissional Documentos
Cultura Documentos
Custom Controls are compiled code (Dlls), easier to use, difficult to create, and can be placed in
toolbox. Drag and Drop controls. Attributes can be set visually at design time. Can be used by
Multiple Applications (If Shared Dlls), Even if Private can copy to bin directory of web application
add reference and use. Normally designed to provide common functionality independent of
consuming Application.
User Controls are similar to those of ASP include files, easy to create, can not be placed in the
toolbox and dragged dropped from it. A User Control is shared among the single application
files.
7. How can you identify that the page is PostBack?
The Page object uses the IsPostBack property to check whether the page is posted back or not.
If the page is postback, this property is set to true.
8. What is ViewState?
ViewState is a .Net mechanism to store the posted data among post backs. ViewState allows the
state of objects to be stored in a hidden field on the page, saved on client side and transported
back to server whenever required.
9. What is Authentication and Authorization?
Authentication is the process of identifying users. Authentication is identifying/validating the user
against the credentials (username and password) and Authorization performs after
authentication.
Authorization is the process of granting access to those users based on identity. Authorization
allowing access of specific resource to user.
10. What are the types of Authentication?
There are 3 types of Authentication. Windows, Forms and Passport Authentication.
Windows authentication uses the security features integrated into the Windows NT and Windows
XP operating systems to authenticate and authorize Web application users.
Forms authentication allows you to create your own list/database of users and validate the
identity of those users when they visit your Web site.
Passport authentication uses the Microsoft centralized authentication provider to identify users.
Passport provides a way to for users to use a single identity across multiple Web applications. To
use Passport authentication in your Web application, you must install the Passport SDK.
11. What are the different ways to send data across pages in Asp.net?
The following two ways are used to send data across pages in Asp.net:
Session
Public properties
12.Where is the Viewstate information stored?
The Viewstate information is stored in the HTML hidden fields.
13. What are different types of directives in .NET?
@Page
@Control
@Import
@Implements
@Register
@Assembly
@OutputCache
@Reference
14. What is the default timeout for a cookie?
The default time duration for a cookie is 30 minutes.
15. What is the difference between HTML and Web server controls?
HTML controls are client side controls therefore, all the validations for HTML controls are
performed at the client side.
On the other hand, Web server controls are server side controls; therefore, all the validations for
Web server controls are performed at the server side.
16. What is the difference between Server-side scripting and Client-side scripting?
Server side scripting means that all the script will be executed by the server and interpreted as
needed. ASP doesnt have some of the functionality like sockets, uploading, etc.
Client side scripting means that the script will be executed immediately in the browser such as
form field validation, clock, email validation, etc. Client side scripting is usually done in VBScript
or JavaScript.
17. How do you create a permanent cookie?
Permanent cookies are available until a specified expiration date, and are stored on the hard
disk.So Set the Expires property any value greater than DataTime.MinValue with respect to the
current datetime. If u want the cookie which never expires set its Expires property equal to
DateTime.maxValue.
18.Which method do you use to redirect the user to another page without performing a
round trip to the client?
Server.Transfer
Server.Execute.
19. What are the major events in Global.Asax file?
Application_Init
Application Disposed
Application Error
Application Start
Application End
Application_BeginRequest
Application_EndRequest
Session Start
Session End
Application_AuthorizationRequest
20. What tag do you use to add a hyperlink column to the DataGrid?
< asp:HyperLinkColumn > < / asp:HyperLinkColumn >
What is Interfaces in C# ?
C# Interview Questions
An interface is similar to a class with method signatures. There wont be any implementation of the
methods in Interface. Classes which implements i...
o
0votes
0answers
Define Multiple Inheritance in C# ?
0 views
C# Interview Questions
In C# , derived classes can inherit from only one base class. If you want inherit multiple base classes,
use interface.
o
0votes
0answers
What is overriding in c# ?
2 views
C# Interview Questions
To override a base class method which is defined as virtual , Override keyword is used. In the above
example , method Drive Type is overrided in de...
o
0votes
0answers
What is Method Hiding in C# ?
6 views
C# Interview Questions
If the derived class doesn't want to use methods in base class , derived class can implement the same
method in derived class with same signature. ...
o
0votes
0answers
What is Method Hiding in C# ?
3 views
C# Interview Questions
If the derived class doesn't want to use methods in base class , derived class can implement the same
method in derived class with same signature. ...
o
0votes
0answers
Explain Polymorphism in C# ?
0 views
C# Interview Questions
Ability of a programming language to process objects in different ways depending on their data type or
class is known as Polymorphism. There are tw...
o
0votes
0answers
Define Abstract Class in C#?
3 views
C# Interview Questions
If we don't want a class object to be created define the class as abstract. An abstract class can have
abstract and non abstract classes. If a meth...
o
0votes
0answers
Explain Static Method?
0 views
C# Interview Questions
It is possible to declare a method as Static provided that they don't attempt to access any instance
data or other instance methods.
o
0votes
0answers
0 views
There are two types of memory references, strong & weak. When a root references an object, it is
said to be a strong reference as the object is...
o
0votes
0answers
0 views
There are two types of memory references, strong & weak. When a root references an object, it is
said to be a strong reference as the object is...
o
0votes
0answers
0 views
Structs are value-type variables and are thus saved on the stack, additional overhead but faster
retrieval. Another difference is that structs cann...
o
0votes
0answers
What is Overloading in C# ?
2 views
C# Interview Questions
When methods are created with same name , but with different signature its called overloading. For
example , WriteLine method in console class is ...
o
0votes
0answers
0 views
Value types are stored on the stack and when a value of a variable is assigned to another variable.
Reference types are stored on the heap, and whe...
o
0votes
0answers
Explain the use of goto statement?
0 views
C# Interview Questions
The goto statement is also included in the C# language. This goto can be used to jump from inside a
loop to outside. But jumping from outside to in...
o
0votes
0answers
0 views
Array is a simple sequence of numbers which are not concerned about each others positions. they are
independent of each others positions. adding,re...
o
0votes
0answers
0 views
The break statement terminates the loop in which it exists. It also changes the flow of the execution of
a program. In switch statements, the break...
o
0votes
0answers
0 views
Both are meant for constant values. A const field can only be initialized at the declaration of the field.
A readonly field can be initialized eith...
o
0votes
0answers
Explain how does C# differ from C++?
4 views
C# Interview Questions
C# does not support #include statement. It uses only using statement. In C# , class definition does not
use a semicolon at the end. C# does not s...
o
0votes
0answers
0 views
The while loop tests its condition at the beginning, which means that the enclosed set of statements
run for zero or more number of times if the co...
o
0votes
0answers
0 views
An Abstract method does not provide an implementation and forces overriding to the deriving class
(unless the deriving class also an abstract class...
o
A console application, which is designed to run at the command line with no user interface. A
Windows application, which is designed to run on a us...
o
0votes
0answers
What do you mean by C#?
C# Interview Questions
0 views
0votes
0answers
3 views
C# supports several different kinds of statements are: Block statements Declaration statements
Expression statements Selection statements Iteration...
o
0votes
0answers
Explain Generics in C#?
0 views
C# Interview Questions
Generics is C# feature introduced in version 2.0 using which you can define type-safe classes to
maximize code reuse,type safety and performance.Fo...
o
0votes
0answers
Explain the lock statement in C#?
0 views
C# Interview Questions
It is ensures that one thread does not enter a critical section of code while another thread is in the
critical section. If another thread attempts...
o
0votes
0answers
Explain Delegates?
0 views
C# Interview Questions
Delegates are a type-safe, object-oriented implementation of function pointers and are used in many
situations where a component needs to call back...
o
0votes
0answers
0 views
C# Interview Questions
A class declaration may specify a base class by following the class name with a colon and the name
of the base class. omitting a base class specifi...
o
0votes
0answers
0 views
Custom Controls are compiled code (Dlls), easier to use, difficult to create, and can be placed in
toolbox. Drag and Drop controls. Attributes can...
o
0votes
0answers
0 views
A struct is a value type and a class is a reference type. When we instantiate a class, memory will be
allocated on the heap and when struct gets i...
1. We have two classes BaseClass and childClass, ChildClass inheret base class. If we make t
counstructor called first?
Ans: Base class constructor will be call first.
4. If we have an abstract method in base class, then we must need to override(or use new k
Ans: Yes, if we not override it then it give error.
5. We know that Base class constructor called first. But if we creating object with parameter
default and parameterized, then which constructor of baseclass called first.
Ans: Base class default constructor called first.
6. Then what you can do that base class parameterized constructor call first.
Ans: We can use "Base" keyword
vikas.ahlawat
Administrator
04-27-2013, 05:54 PM (This post was last modified: 07-20-2013 11:07 AM by vikas.ahlawat.)
Post: #1
Nice Post!!