Arno,
To compile you would use the langiuage compiler. For C#, that is csc.exe
located in
c:\windows\Microsoft.NET\Framework\v1.1.4322\csc
and you would invoke it thusly:
csc /target:library /out:MyLibrary.dll Module1.cs Module2.cs Module3.cs
On the cmd line include all of the C# modules you want to combine into the
DLL. This might be just one C# file: the proxy generated from wsdl.exe.
But you might have other helper classes, or you might decide you want to
inherit from the proxy, etc. Probably if you are just starting, you would
have just the one source module.
The resulting DLL goes into the bin dir, as I said.
For business classes, you have a couple of options.
1. You can build them into a DLL in the same way - the only difference here
is that rather than starting with"generated" code - generated from
wsdl.exe - you will be starting with code you have written. You compile and
drop the DLL into the bin, just like with the proxy. In fact there is no
technical difference whatsoever. Then you call the "business methods" from
your aspx server-side script.
2. you can also use code-behind, and utilize the ASP.NET infrastructure to
compile your "business methods" at runtime, on demand. To do this, you
would code your aspx page (Maybe it is called "MyPage.aspx") like this:
<%@ Page Language="C#" ContentType="application/pdf" Inherits="MyClass"
src="MyClass.aspx.cs" %>
Then, you write a second source module, called "MyClass.aspx.cs" and drop
that into the same web directory with your MyPage.aspx. This module ought
to look like so:
public class MyClass : System.Web.UI.Page {
private void Page_Load(object sender, System.EventArgs e) {
....
}
...
}
In that class you can provide methods for any of the page-level events, such
as the skeletal Page_Load() shown above. For more on the page-level
events see
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWebUIPageClassTopic.asp
or google for "code behind"
http://www.google.com/search?hl=en&num=30&q="code+behind"
-------
Of course, you can use a combination of code-behind (#2) and DLLs (#1) in
your ASP.NET apps.
------------
This post is probably not enough to get you really rolling. Look at some
working samples, especially the ASP.NET quickstarts that are included in the
..NET SDK.
C:\netsdk\QuickStart\aspplus\samples\webforms\intro is a nice place to
start.
Even better, Get yourself a book!
"ASP.NET Unleashed" is a fine one, but there are a million other ASP.NET
books out there.
-Dino