I'm looking at the source code of the ASP.NET forum sample application. It
has the "code-behind" classes compiled into a separate DLL, totally
separated from the aspx/ascx files. Adding the class files alone in VS.NET
is straightforward , but is there a way configure VS.NET to add aspx/ascx
files alone? 4 7008
I don't understand the question. There are 2 components to an ASPX page: The
Page Template (.aspx) and the CodeBehind (.vb or .cs). The CodeBehind is
compiled into a DLL. The Page Template remains as text. You can't run the
app without both. There is a way to use CodeBehind without compiling to a
DLL. Is that what you're after?
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer http://www.takempis.com
Complex things are made up of
lots of simple things.
"BH" <bo*******@yaho o.com> wrote in message
news:On******** *****@TK2MSFTNG P09.phx.gbl... I'm looking at the source code of the ASP.NET forum sample application.
It has the "code-behind" classes compiled into a separate DLL, totally separated from the aspx/ascx files. Adding the class files alone in
VS.NET is straightforward , but is there a way configure VS.NET to add aspx/ascx files alone?
What I was referring to was to develop the "codebehind " classes in a class
library project and compile into a DLL. Then this DLL is referenced in the
web project, which has its own DLL. The web project would largely consists
of the aspx/ascx files. The web project compiles into a small DLL (pretty
much global.asax.cs) . The classes in the first DLL are used in the aspx by
registering like this:
<%@ Register TagPrefix="AspN etForums" Namespace="AspN etForums.Contro ls"
Assembly="AspNe tForums" %>
.........
<AspNetForums:L oginProcessor id="abc123" runat="server" />
.........
What I want to know is if I go with this kind of code separation, how do I
add an aspx or ascx without the VS.NET automatically sticks an
aspx.cs/ascx.cs file for me, as I don't need the cs files in the web project
itself, they are defined in the class library project.
"Kevin Spencer" <ke***@takempis .com> wrote in message
news:uW******** *****@tk2msftng p13.phx.gbl... I don't understand the question. There are 2 components to an ASPX page:
The Page Template (.aspx) and the CodeBehind (.vb or .cs). The CodeBehind is compiled into a DLL. The Page Template remains as text. You can't run the app without both. There is a way to use CodeBehind without compiling to a DLL. Is that what you're after?
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer http://www.takempis.com Complex things are made up of lots of simple things.
"BH" <bo*******@yaho o.com> wrote in message news:On******** *****@TK2MSFTNG P09.phx.gbl... I'm looking at the source code of the ASP.NET forum sample application. It has the "code-behind" classes compiled into a separate DLL, totally separated from the aspx/ascx files. Adding the class files alone in VS.NET is straightforward , but is there a way configure VS.NET to add aspx/ascx files alone?
I'm still having trouble understanding you. A Class Library is just a
collection of classes. It is different than CodeBehind. A CodeBehind class
is the class that completes an ASP.Net Page class, which is made up of a
Template and a CodeBehind class. If your project has a class library, it
would have TWO DLLs with it, one for the Class Library, and one for the
CodeBehind classes of the Pages. If you add a new .aspx page to your
project, you will also need the CodeBehind class, assuming that you want
that page to DO something.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer http://www.takempis.com
Complex things are made up of
lots of simple things.
"BH" <bo*******@yaho o.com> wrote in message
news:eQ******** ******@TK2MSFTN GP09.phx.gbl... What I was referring to was to develop the "codebehind " classes in a class library project and compile into a DLL. Then this DLL is referenced in
the web project, which has its own DLL. The web project would largely
consists of the aspx/ascx files. The web project compiles into a small DLL (pretty much global.asax.cs) . The classes in the first DLL are used in the aspx
by registering like this:
<%@ Register TagPrefix="AspN etForums" Namespace="AspN etForums.Contro ls" Assembly="AspNe tForums" %> ........ <AspNetForums:L oginProcessor id="abc123" runat="server" /> ........
What I want to know is if I go with this kind of code separation, how do I add an aspx or ascx without the VS.NET automatically sticks an aspx.cs/ascx.cs file for me, as I don't need the cs files in the web
project itself, they are defined in the class library project. "Kevin Spencer" <ke***@takempis .com> wrote in message news:uW******** *****@tk2msftng p13.phx.gbl... I don't understand the question. There are 2 components to an ASPX page: The Page Template (.aspx) and the CodeBehind (.vb or .cs). The CodeBehind is compiled into a DLL. The Page Template remains as text. You can't run
the app without both. There is a way to use CodeBehind without compiling to
a DLL. Is that what you're after?
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer http://www.takempis.com Complex things are made up of lots of simple things.
"BH" <bo*******@yaho o.com> wrote in message news:On******** *****@TK2MSFTNG P09.phx.gbl... I'm looking at the source code of the ASP.NET forum sample
application. It has the "code-behind" classes compiled into a separate DLL, totally separated from the aspx/ascx files. Adding the class files alone in VS.NET is straightforward , but is there a way configure VS.NET to add
aspx/ascx files alone?
I figured this out. To add aspx file alone, the VS.NET templates have to be
changed so it shows up as a separate item in the Add New Item list. Web
Forms and User Controls defined as is can only be added with the code behind
file being added at the same time.
Kevin, you can download the ASPNET Forums sample app from asp.net and you'll
see what I mean. Thanks.
"Kevin Spencer" <ke***@takempis .com> wrote in message
news:O8******** *****@TK2MSFTNG P09.phx.gbl... I'm still having trouble understanding you. A Class Library is just a collection of classes. It is different than CodeBehind. A CodeBehind class is the class that completes an ASP.Net Page class, which is made up of a Template and a CodeBehind class. If your project has a class library, it would have TWO DLLs with it, one for the Class Library, and one for the CodeBehind classes of the Pages. If you add a new .aspx page to your project, you will also need the CodeBehind class, assuming that you want that page to DO something.
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer http://www.takempis.com Complex things are made up of lots of simple things.
"BH" <bo*******@yaho o.com> wrote in message news:eQ******** ******@TK2MSFTN GP09.phx.gbl... What I was referring to was to develop the "codebehind " classes in a
class library project and compile into a DLL. Then this DLL is referenced in the web project, which has its own DLL. The web project would largely consists of the aspx/ascx files. The web project compiles into a small DLL
(pretty much global.asax.cs) . The classes in the first DLL are used in the aspx by registering like this:
<%@ Register TagPrefix="AspN etForums" Namespace="AspN etForums.Contro ls" Assembly="AspNe tForums" %> ........ <AspNetForums:L oginProcessor id="abc123" runat="server" /> ........
What I want to know is if I go with this kind of code separation, how do
I add an aspx or ascx without the VS.NET automatically sticks an aspx.cs/ascx.cs file for me, as I don't need the cs files in the web project itself, they are defined in the class library project. "Kevin Spencer" <ke***@takempis .com> wrote in message news:uW******** *****@tk2msftng p13.phx.gbl... I don't understand the question. There are 2 components to an ASPX
page: The Page Template (.aspx) and the CodeBehind (.vb or .cs). The CodeBehind
is compiled into a DLL. The Page Template remains as text. You can't run the app without both. There is a way to use CodeBehind without compiling
to a DLL. Is that what you're after?
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer http://www.takempis.com Complex things are made up of lots of simple things.
"BH" <bo*******@yaho o.com> wrote in message news:On******** *****@TK2MSFTNG P09.phx.gbl... > I'm looking at the source code of the ASP.NET forum sample application. It > has the "code-behind" classes compiled into a separate DLL, totally > separated from the aspx/ascx files. Adding the class files alone in VS.NET > is straightforward , but is there a way configure VS.NET to add aspx/ascx > files alone? > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Florida Coder |
last post by:
I have the need to store some application specific configuration data to be
used by a class library and or a windows service. I would like to do this
in a fashion similar to the way we do with applications and web services
without having to use the machine.config file.
I know that I could use the code below to do this but the problem then
becomes that when using a shared assembly both the assembly and the config
file need to be put...
|
by: Steve Bugden |
last post by:
Hi,
I am trying to reference an html page from an aspx file. The intention is
that the html file will contain the content for my web site and the aspx will
contain the navigation, logo etc. Then I am hoping I can maintain the html
files separately via Frontpage.
I have tried a server include i.e.
<!-- #Include File="c:\somedirectory\somefilename.htm" -->
|
by: Garth17 |
last post by:
I'm trying to figure out a solution for sharing common properties and
methods in all me .aspx and .ascx pages.
In classic ASP I would use include directives.
So far I have made 2 base classes WebFormBase and UserControlBase. And
then set all my webforms and usercontrols inherit from the appropriate
one. But this forces me to replicate my code between to the two base
classes.
|
by: bienwell |
last post by:
Hi,
I have a question about file included in ASP.NET. I have a file that
includes all the Sub functions (e.g FileFunct.vb). One of the functions
in this file is :
Sub TestFunct(ByVal strInput As String)
return (strInput & " test")
End Sub
|
by: ptass |
last post by:
Hi
In asp.net 2.0 an aspx files .cs file is a partial class and all works fine,
however,
I thought I’d be able to create another class file, call it a partial class
and have
that compile and load as a 3rd partial class. This would be handy so i can
generate
standard code into one of the partial classes, while having my custom code
untouched
| |
by: Hiten |
last post by:
Is it possible to have more code behind file but that file will have
same class in way of partial class,
Default
Structure I
--------------
Homepage.aspx
+ Homepage.aspx.cs (this .cs file will have "Homepage" class
which is partial)
|
by: rn5a |
last post by:
Using VBC, I compiled a VB class file into a DLL named MyPro.dll. The
namespace used in this class file is 'MyPro' & the public class is
named 'MyClass'. This is the ASPX page which imports the namespace &
instantiates the class 'MyClass' so that the ASPX code can invoke the
different functions existing within the class 'MyClass':
<%@ Import Namespace="MyPro" %>
<script runat="server">
Public boMyClass As MyClass
|
by: Jan |
last post by:
Hi,
I defined a function like this:
Public Function myfunction(ByVal myvar As Object) As String
...
Return xyz
End Function
in aspx file, i use it like this:
|
by: gw7rib |
last post by:
If a class has more than one member function, is it possible for the
code for one to be in one translation unit (ie file) and the code for
another to be in a different translation unit? I would have thought
so, yet I still have a nagging doubt about it. If it is allowed, is it
a good idea?
My problem is that I have a class which does far, far too much, but I
haven't managed to break its functions down into several self-
contained...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |