codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Including Multiple assemblies  Sthefan at 22:15 on Tuesday, October 28, 2003
 

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












CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Date script issues
•  perl script help needed
•  onChange issue
•  perl remote execution
•  Chat application
•  How to send multiple perameters in SOAP request.
•  Java code for Insert picture on the table in spreadsheet
•  Re: Problem with concatenation
•  how to genrates the crystal report by sending a id at runtime


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007