How many Directives r in ASP.NET?

Answer Posted / ashish tiwari

There r 11 types directives in asp.net,

1)@ Assembly
Links an assembly to the current page or user control
declaratively.

2)@ Control
Defines control-specific attributes used by the ASP.NET
page parser and compiler and can be included only in .ascx
files (user controls).

3)@ Implements
Indicates that a page or user control implements a
specified .NET Framework interface declaratively.

4)@ Import
Imports a namespace into a page or user control explicitly.

5)@ Master
Identifies a page as a master page and defines attributes
used by the ASP.NET page parser and compiler and can be
included only in .master files.

6)@ MasterType
Defines the class or virtual path used to type the Master
property of a page.

7)@ OutputCache
Controls the output caching policies of a page or user
control declaratively.

8)@ Page
Defines page-specific attributes used by the ASP.NET page
parser and compiler and can be included only in .aspx files.

9)@ PreviousPageType
Creates a strongly typed reference to the source page from
the target of a cross-page posting.

10)@ Reference
Links a page, user control, or COM control to the current
page or user control declaratively.

11)@ Register
Associates aliases with namespaces and classes, which
allow user controls and custom server controls to be
rendered when included in a requested page or user control

Is This Answer Correct ?    37 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is asp.net introduction?

518


Hi this is the coding for adding data in to an xml table i want the coding for update and delete Try Dim emp_xml_doc As New XmlDocument If System.IO.File.Exists(Server.MapPath("emp.xml")) Then emp_xml_doc.Load(Server.MapPath("emp.xml")) Dim myrow_element As XmlElement myrow_element = emp_xml_doc.CreateElement("EmpDetails") Dim str As String str = "" & TxtEmpId.Text & "" & _ "" & TxtName.Text & "" & _ "" & TxtSalary.Text & "" myrow_element.InnerXml = str emp_xml_doc.DocumentElement.AppendChild(myrow_element) emp_xml_doc.Save(Server.MapPath("emp.xml")) Response.Write("Record Saved") Dim ds As New DataSet ds.ReadXml(Server.MapPath("emp.xml")) GridView1.DataSource = ds GridView1.DataBind() Else Response.Write("File does not exist.") End If Catch ex As Exception Response.Write(ex.ToString) End Try *********************** this is the xml file 100 xxx 2000 yyy dddd 77777 rrrr rrrr 6666 qaqa sini 50000 errrrrrrrr rrrrrrrrr 677777 rrr rrr 33

1725


how can create login from create and written conde in asp.net

1773


Which protocol is used to call web service?

560


Can you explain how ASP.NET application life cycle and page life cycle events fire?

564






Are cookies stored on server or client?

500


What is the basic purpose of the required field validator? How can you use a required field validator to check that the user changes the initial value of a text box? a listbox?

1419


What is server infrastructure & server components?

779


In a page I have gridview with options of select and delete using hyperlink when I am selecting any one of then it has to open another page how can it?

505


Can user control be stored in library?

515


What is the full form of asp.net?

529


What is the Difference between MVC And MVP design pattrens

2201


What is .net remoting?

566


Which protocol is used to call a web service?

558


What kind of data we can store in viewstate?

572