|
Hello,
I'm coding .aspx pages using the codebehind paradigm instead of the old inline classic coding.
I know that to use the methods and properties from a class I must use the following code:
<%@ Page language="c#" src="CodeBehind1.aspx.cs" Inherits="Project.CodeBehind" AutoEventWireup="false" %>
or if it's compiled:
<%@ Page language="c#" Inherits="Project.CodeBehind1" AutoEventWireup="false" %>
but if, I want to access the method from a second class?
Suppose a scenario, where I have a form, and I have to access 2 classes:
* One with methods to Data access (I want to use SQL to store form's data)
* Another class got methods that cleans up user's data avoiding invalid input, and SQL injections among other thinks.
How this can be done? And thinking ahead, where is needed to include multiple assemblies.
I tried to put the following code (just a rough draft code, don't take as real):
// Here for example I'm calling the class with data Methods
<%@ Page language="c#" src="DataClass.aspx.cs"
Inherits="DataClass" AutoEventWireup="false" %>
// And Here I'm calling the class with the security methods
<%@ Assembly src="SecurityClass.aspx.cs" %>
<%@ Import Namespace="Security" %>
I will be happy if the solution comes as .cs or .dll ;-)
Sthefan Berwanger
|
|
|
|
|
|
|
// |