|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How do I use Import or Inherits on a Single Page .aspx PageHi Gang,
I have trouble getting my single page Aspx pages to allow the imports and or inherits command. Can someone reply with an example. Thanks, Christian Blackburn Import and Inherit are very different animals.
Imports is like a big With statement for your current file. It brings a namespace into scope so that you can use it without having to fully qualify the name you are using. You specify the imports at the very top of your code. Inherits means that you want your new class to be based on the class you are inheriting from. Inherits are placed on the class not on the file, thus it should be the first line after your class declaration. You can only inherit from one class because a thing can only be one thing ("is a" relationship). It may contain many things ("has a" relationship) which is where interfaces come in. Since you are working with web applications, your web forms already inherit from System.Web.UI.Page. It can not directly inherit from something else as well (although you can subclass that and extend it with your own functionality if necessary). Jim Wooley http://devauthority.com/blogs/jwooley/default.aspx Show quoteHide quote > Hi Gang, > > I have trouble getting my single page Aspx pages to allow the imports > and or inherits command. Can someone reply with an example. > > Thanks, > Christian Blackburn
ASCII Character code for the 6th power
Is there a built in command to encode SQL strings? Lost my Design view for a Windows Form (VB 2005) Last Modified date for the Source code. Launch new instance of IE?? GraphicsPath.IsVisible broken? Placeholder Object Question text file to datatable to SQL2005 table not working Can RichTextBox Control Render HTML?? Delete a DataSource in vs.net |
|||||||||||||||||||||||