Custom Class without Code Behind Model

Polar Bear

Newcomer
Joined
Aug 5, 2005
Messages
15
Hi,

I don't use code behind in my application because I like to have the code within the page I am editing, and cause I'm using Dreamweaver and I would have to have 2 files open for each page. Anyway, I need to Create a class that implementds and extends IPrincipal for creating security (I have the code from MSDN). My question is how do I implement this custom class into my Inline Script Model pages?

Thank You
 
Not sure it's possible. I think each aspx page is compiled into 1 class. You might be able to create a private class within it to be used within that one page by using:

Visual Basic:
private class MyClass
End class

If you go used to code behind I think you'd like it. Makes the aspx page much neater.

:)
 
I simply create a .vb or .cs file with my class code and then add it to any aspx page via the Assembly directive.

Code:
[b]<%@ Assembly Src=[/b]"[i]filename.vb[/i]"[b] %>[/b]
 
mark007 said:
well ok but that's kind of code behind and separate file which I thought you wanted to avoid..
Yea I know but there is no other way. I just didn't want to totally seperate my html from code.
 
Back
Top