Directives Interview Questions on ASP.Net(10)
1.What is @Page Directive?
A.The @Page directive enables you to
specify attributes and values for an Asp.Net Page to be used when the page is
parsed and compiled. Every .aspx files should include this @Page directive to
execute. There are many attributes belong to this directive.
2.What is @Master Directive?
A.The @Master directive is quite
similar to the @Page directive. The @Master directive belongs to Master Pages
that is .master files. The master page will be used in conjunction of any
number of content pages. So the content pages can the inherits the attributes
of the master page. Even though, both @Page and @Master page directives are
similar, the @Master directive has only fewer attributes
3.What is @Control Directive?
A.The @Control directive is used when we
build an Asp.Net user controls. The @Control directive helps us to define the
properties to be inherited by the user control. These values are assigned to
the user control as the page is parsed and compiled.
4.What is@Register Directive?
A.The @Register directive associates
aliases with namespaces and class names for notation in custom server control
syntax. When you drag and drop a user control onto your .aspx pages, the Visual
Studio 2005 automatically creates an @Register directive at the top of the
page. This register the user control on the page so that the control can be
accessed on the .aspx page by a specific name.
5.What is @Reference Directive?
A.The @Reference directive declares
that another asp.net page or user control should be complied along with the
current page or user control.
6.What is@PreviousPageType Directive?
A.The @PreviousPageType is a new
directive makes excellence in asp.net 2.0 pages. The concept of cross-page
posting between Asp.Net pages is achieved by this directive. This directive is
used to specify the page from which the cross-page posting initiates.
7.What is @OutputCache Directive?
A.The @OutputCache directive controls
the output caching policies of the Asp.Net page or user control. You can even
cache programmatically through code by using Visual Basic .NET or Visual C#
.NET.
8.What is @Implements Directive?
A.The @Implements directive gets the Asp.Net page to implement a specified .NET
framework interface. The only single attribute is Interface, helps to specify
the .NET Framework interface. When the Asp.Net page or user control implements
an interface, it has direct access to all its events, methods and properties.
9.What is @Assembly Directive?
A.The @Assembly directive is used to
make your ASP.NET page aware of external components.
10.What is @MasterType Directive?
A.To access members of a specific
master page from a content page, you can create a strongly typed reference to
the master page by creating a @MasterType directive. This directive supports of
two attributes such as TypeName and VirtualPath.
0 comments:
Post a Comment