|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Confused Using VB in VS2003I 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 Wayne,
If you only changed something in the code behind you should only need to copy the dll to the web server. Ken ---------------------- Show quoteHide quote "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 > > > OK, I'll try that next time. When do I have to copy the myform.aspx.vb page
out there? Wayne Show quoteHide quote "Ken Tucker [MVP]" <KenTucker***@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 >> >> >> 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 Show quoteHide quote "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]" <KenTucker***@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 >>> >>> >>> > > 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 Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:uuekiSYYGHA.2376@TK2MSFTNGP03.phx.gbl... > 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]" <KenTucker***@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 >>>> >>>> >>>> >> >> > > 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. 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 Show quoteHide quote "Cerebrus" <zorg***@sify.com> wrote in message news:1145244212.104119.141440@z34g2000cwc.googlegroups.com... > 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. > |
|||||||||||||||||||||||