Senator Guerra Souty original series calendar,replica hublot blue steel peach pointer collocation of rolex replica Rome digital scale, track type minute replica watches scale shows that the classical model is swiss replica watches incomparable, wearing elegant dress highlights.


YOU ARE HERE: HOME Questions What is difference between inherits and src attributes in page directive

Inherits vs. Src attributes in page directive

View(s): 18140

What is difference between inherits and src attributes in page directive?

Answer 1)

: It specifies the source file name of the code behind class to dynamically compile when the page is requested. You can include the programming logic for you page either in a class or in code declaration block in the aspx file. it reduces the performance.

VS.NET (IDE), do not use this attribute. Instead they use precompile "code behind" and "Inherits" attribute.

Inherits: Defines a code-behind class for the page to inherit. This can be any class derived from the Page class. This attribute is used with the CodeFile attribute, which contains the path to the source file for the code-behind class. The Inherits attribute is case-sensitive when using C# as the page language, and case-insensitive when using Visual Basic as the page language.

If the Inherits attribute does not contain a namespace, ASP.NET checks whether the ClassName attribute contains a namespace. If so, ASP.NET attempts to load the class referenced in the Inherits attribute using the namespace of the ClassName attribute. (This assumes that the Inherits attribute and the ClassName attribute both use the same namespace.)

  Asked in:  Mahindra Satyam   Expertise Level:  Intermediate
  Last updated on Saturday, 04 August 2012
3/5 stars (4 vote(s))

Register Login Ask Us Write to Us Help