Confused Using VB in VS2003

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Wayne Wengert

    #1

    Confused Using VB in VS2003

    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


  • Ken Tucker [MVP]

    #2
    RE: Confused Using VB in VS2003

    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:
    [color=blue]
    > 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
    >
    >
    >[/color]

    Comment

    • Wayne Wengert

      #3
      Re: Confused Using VB in VS2003

      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@d iscussions.micr osoft.com> wrote in message
      news:F55975EB-60F1-4750-96E2-A34830F0C593@mi crosoft.com...[color=blue]
      > 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:
      >[color=green]
      >> 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
      >>
      >>
      >>[/color][/color]


      Comment

      • Cor Ligthert [MVP]

        #4
        Re: Confused Using VB in VS2003

        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:ePkYlcXYGH A.3684@TK2MSFTN GP05.phx.gbl...[color=blue]
        > 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@d iscussions.micr osoft.com> wrote in
        > message news:F55975EB-60F1-4750-96E2-A34830F0C593@mi crosoft.com...[color=green]
        >> 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:
        >>[color=darkred]
        >>> 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
        >>>
        >>>
        >>>[/color][/color]
        >
        >[/color]


        Comment

        • Wayne Wengert

          #5
          Re: Confused Using VB in VS2003

          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:uuekiSYYGH A.2376@TK2MSFTN GP03.phx.gbl...[color=blue]
          > 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:ePkYlcXYGH A.3684@TK2MSFTN GP05.phx.gbl...[color=green]
          >> 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@d iscussions.micr osoft.com> wrote in
          >> message news:F55975EB-60F1-4750-96E2-A34830F0C593@mi crosoft.com...[color=darkred]
          >>> 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
          >>>>
          >>>>
          >>>>[/color]
          >>
          >>[/color]
          >
          >[/color]


          Comment

          • Cerebrus

            #6
            Re: Confused Using VB in VS2003

            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.

            Comment

            • Wayne Wengert

              #7
              Re: Confused Using VB in VS2003

              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.c om> wrote in message
              news:1145244212 .104119.141440@ z34g2000cwc.goo glegroups.com.. .[color=blue]
              > 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.
              >[/color]


              Comment

              • Cerebrus

                #8
                Re: Confused Using VB in VS2003

                My best wishes for your endeavour. ;-)

                Regards,

                Cerebrus.

                Comment

                Working...