 |
|
| .NET DotNet Forum Index » VB.NET Forum (Visual Basic .NET) » Confused Using VB in VS2003 |
|
Page 1 of 1 |
|
| Author |
Message |
| Wayne Wengert |
Posted: Sun Apr 16, 2006 7:13 am |
|
|
|
Guest
|
I have an ASP.NET (VB) Web Application developed in VS2003. I am totally
confused on what needs to get copied to the Web Host when I make some
changes. Most of the forms are aspx pages and include a codebehind file
(e.g. myform.aspx and myform.aspx.vb) Normally I do a project rebuild and
then a Copy Project with FrontPage option and only required files and then
FTP those files. That is a lot of files. If I make a change to the VB code
in just one file (e.g. myform.aspx.vb) exactly what needs to be done to get
that change on the host without copying unchanged files?
Wayne |
|
|
| Back to top |
|
|
|
| Ken Tucker [MVP] |
Posted: Sun Apr 16, 2006 10:21 am |
|
|
|
Guest
|
Wayne,
If you only changed something in the code behind you should only
need to copy the dll to the web server.
Ken
----------------------
"Wayne Wengert" wrote:
Quote: I have an ASP.NET (VB) Web Application developed in VS2003. I am totally
confused on what needs to get copied to the Web Host when I make some
changes. Most of the forms are aspx pages and include a codebehind file
(e.g. myform.aspx and myform.aspx.vb) Normally I do a project rebuild and
then a Copy Project with FrontPage option and only required files and then
FTP those files. That is a lot of files. If I make a change to the VB code
in just one file (e.g. myform.aspx.vb) exactly what needs to be done to get
that change on the host without copying unchanged files?
Wayne
|
|
|
| Back to top |
|
|
|
| Wayne Wengert |
Posted: Sun Apr 16, 2006 10:59 am |
|
|
|
Guest
|
OK, I'll try that next time. When do I have to copy the myform.aspx.vb page
out there?
Wayne
"Ken Tucker [MVP]" <KenTuckerMVP@discussions.microsoft.com> wrote in message
news:F55975EB-60F1-4750-96E2-A34830F0C593@microsoft.com...
Quote: Wayne,
If you only changed something in the code behind you should only
need to copy the dll to the web server.
Ken
----------------------
"Wayne Wengert" wrote:
I have an ASP.NET (VB) Web Application developed in VS2003. I am totally
confused on what needs to get copied to the Web Host when I make some
changes. Most of the forms are aspx pages and include a codebehind file
(e.g. myform.aspx and myform.aspx.vb) Normally I do a project rebuild and
then a Copy Project with FrontPage option and only required files and
then
FTP those files. That is a lot of files. If I make a change to the VB
code
in just one file (e.g. myform.aspx.vb) exactly what needs to be done to
get
that change on the host without copying unchanged files?
Wayne
|
|
|
| Back to top |
|
|
|
| Cor Ligthert [MVP] |
Posted: Sun Apr 16, 2006 12:37 pm |
|
|
|
Guest
|
Wayne,
As Ken already said, you only need your DLL to copy, (the best in a by
settings save placed directory as bin). Your .vb or .cs pages should in
normal situations never be copied to your webserver and don't have to be
there.
I hope this helps,
Cor
"Wayne Wengert" <wayneSKIPSPAM@wengert.org> schreef in bericht
news:ePkYlcXYGHA.3684@TK2MSFTNGP05.phx.gbl...
Quote: OK, I'll try that next time. When do I have to copy the myform.aspx.vb
page out there?
Wayne
"Ken Tucker [MVP]" <KenTuckerMVP@discussions.microsoft.com> wrote in
message news:F55975EB-60F1-4750-96E2-A34830F0C593@microsoft.com...
Wayne,
If you only changed something in the code behind you should only
need to copy the dll to the web server.
Ken
----------------------
"Wayne Wengert" wrote:
I have an ASP.NET (VB) Web Application developed in VS2003. I am totally
confused on what needs to get copied to the Web Host when I make some
changes. Most of the forms are aspx pages and include a codebehind file
(e.g. myform.aspx and myform.aspx.vb) Normally I do a project rebuild
and
then a Copy Project with FrontPage option and only required files and
then
FTP those files. That is a lot of files. If I make a change to the VB
code
in just one file (e.g. myform.aspx.vb) exactly what needs to be done to
get
that change on the host without copying unchanged files?
Wayne
|
|
|
| Back to top |
|
|
|
| Wayne Wengert |
Posted: Sun Apr 16, 2006 5:32 pm |
|
|
|
Guest
|
Thanks for the reply, but when the .vb pages are not out there, I get errors
that it can't find the .vb file?
Wayne
"Cor Ligthert [MVP]" <notmyfirstname@planet.nl> wrote in message
news:uuekiSYYGHA.2376@TK2MSFTNGP03.phx.gbl...
Quote: Wayne,
As Ken already said, you only need your DLL to copy, (the best in a by
settings save placed directory as bin). Your .vb or .cs pages should in
normal situations never be copied to your webserver and don't have to be
there.
I hope this helps,
Cor
"Wayne Wengert" <wayneSKIPSPAM@wengert.org> schreef in bericht
news:ePkYlcXYGHA.3684@TK2MSFTNGP05.phx.gbl...
OK, I'll try that next time. When do I have to copy the myform.aspx.vb
page out there?
Wayne
"Ken Tucker [MVP]" <KenTuckerMVP@discussions.microsoft.com> wrote in
message news:F55975EB-60F1-4750-96E2-A34830F0C593@microsoft.com...
Wayne,
If you only changed something in the code behind you should only
need to copy the dll to the web server.
Ken
----------------------
"Wayne Wengert" wrote:
I have an ASP.NET (VB) Web Application developed in VS2003. I am
totally
confused on what needs to get copied to the Web Host when I make some
changes. Most of the forms are aspx pages and include a codebehind file
(e.g. myform.aspx and myform.aspx.vb) Normally I do a project rebuild
and
then a Copy Project with FrontPage option and only required files and
then
FTP those files. That is a lot of files. If I make a change to the VB
code
in just one file (e.g. myform.aspx.vb) exactly what needs to be done to
get
that change on the host without copying unchanged files?
Wayne
|
|
|
| Back to top |
|
|
|
| Cerebrus |
Posted: Sun Apr 16, 2006 9:23 pm |
|
|
|
Guest
|
Hi Wayne,
There is a conceptual issue you need to understand, here. There are two
ways of compiling your pages :
1. Without Precompilation :
------------------------------------------
In this method, your .aspx page and your code-behind file(.vb or .cs)
reside on the web
server. When a client requests your .aspx page, ASP.NET compiles both
the .aspx and the
code-behind file, into .dll files.
In this method, your .aspx is linked to your .vb file using the "src"
attribute of the Page
directive, which points to the .vb file.
2. With Precompilation :
-----------------------------------
This is the preferred method, since you don't have to distribute your
Code-behind file to
the web server. There are also other advantages. And this is the method
that Cor and
Ken are suggesting you should use.
In this method, only your .aspx page resides on the web server
initially. You can then
compile your .vb into a .dll manually using the "vbc.exe" command line
compiler. This will
generate your code-behind .dll. Now you need to do two things :
a) Copy this .dll to the bin directory in the application folder on the
webserver.
b) Remove the "src" attribute of the Page directive in your .aspx file.
Make sure
"Inherits" points to the fully qualified class name of your Code-behind
file.
Now, when a client requests your .aspx page, ASP.NET will compile only
1 file, that is your
..aspx file, but while doing this, it will include references to the
..dll file placed in the bin
sub-directory.
So, this method is much easier for maintenance.
Hope I was able to explain it in lucid terms,
Regards,
Cerebrus. |
|
|
| Back to top |
|
|
|
| Wayne Wengert |
Posted: Mon Apr 17, 2006 3:37 am |
|
|
|
Guest
|
Thank you very much for that informative response. I actually think I
understand some of what is going on here (an accomplishment for an old duck
like me!). I will save your instructions and see if I can't get better
control of my web pages.
Wayne
"Cerebrus" <zorg007@sify.com> wrote in message
news:1145244212.104119.141440@z34g2000cwc.googlegroups.com...
Quote: Hi Wayne,
There is a conceptual issue you need to understand, here. There are two
ways of compiling your pages :
1. Without Precompilation :
------------------------------------------
In this method, your .aspx page and your code-behind file(.vb or .cs)
reside on the web
server. When a client requests your .aspx page, ASP.NET compiles both
the .aspx and the
code-behind file, into .dll files.
In this method, your .aspx is linked to your .vb file using the "src"
attribute of the Page
directive, which points to the .vb file.
2. With Precompilation :
-----------------------------------
This is the preferred method, since you don't have to distribute your
Code-behind file to
the web server. There are also other advantages. And this is the method
that Cor and
Ken are suggesting you should use.
In this method, only your .aspx page resides on the web server
initially. You can then
compile your .vb into a .dll manually using the "vbc.exe" command line
compiler. This will
generate your code-behind .dll. Now you need to do two things :
a) Copy this .dll to the bin directory in the application folder on the
webserver.
b) Remove the "src" attribute of the Page directive in your .aspx file.
Make sure
"Inherits" points to the fully qualified class name of your Code-behind
file.
Now, when a client requests your .aspx page, ASP.NET will compile only
1 file, that is your
.aspx file, but while doing this, it will include references to the
.dll file placed in the bin
sub-directory.
So, this method is much easier for maintenance.
Hope I was able to explain it in lucid terms,
Regards,
Cerebrus.
|
|
|
| Back to top |
|
|
|
| Cerebrus |
Posted: Mon Apr 17, 2006 4:05 am |
|
|
|
Guest
|
My best wishes for your endeavour. ;-)
Regards,
Cerebrus. |
|
|
| Back to top |
|
|
|
|
|
All times are GMT - 5 Hours
The time now is Mon Nov 30, 2009 7:58 pm
|
|