Code behind query

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

    Code behind query

    I have a solution developed in VS.net.

    It has been pointed out to me that code behind pages cannot be altered on
    the site as the solution would need recompiling to update the dll in the
    /bin folder.

    Unfortunatly there is 1 page on my site which I need to frequently change
    slightly and I dont want to have to recompile every time.

    If I excluded this page from my project but uploaded it to my site could I
    then alter it and see the changes ?

    Thanks in Advance


  • Kevin Spencer

    #2
    Re: Code behind query

    What is it aht you need to change frequently in a page? If it's content, why
    don't you put have the Page fetch the content dynamically, so that you can
    simply change the content without recompiling?

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Poppy" <paul.diamond@N OSPAMthemedialo unge.com> wrote in message
    news:OqZtFn77DH A.2404@TK2MSFTN GP11.phx.gbl...[color=blue]
    > I have a solution developed in VS.net.
    >
    > It has been pointed out to me that code behind pages cannot be altered on
    > the site as the solution would need recompiling to update the dll in the
    > /bin folder.
    >
    > Unfortunatly there is 1 page on my site which I need to frequently change
    > slightly and I dont want to have to recompile every time.
    >
    > If I excluded this page from my project but uploaded it to my site could I
    > then alter it and see the changes ?
    >
    > Thanks in Advance
    >
    >[/color]


    Comment

    • Poppy

      #3
      Re: Code behind query

      It's much more complicated then that.

      I can not do this dynamically.

      All I want to know is :
      If I exclude it from my project can I alter that page without having to
      recompile ???



      "Kevin Spencer" <kevin@takempis .com> wrote in message
      news:#erLUm97DH A.2812@TK2MSFTN GP11.phx.gbl...[color=blue]
      > What is it aht you need to change frequently in a page? If it's content,[/color]
      why[color=blue]
      > don't you put have the Page fetch the content dynamically, so that you[/color]
      can[color=blue]
      > simply change the content without recompiling?
      >
      > --
      > HTH,
      > Kevin Spencer
      > .Net Developer
      > Microsoft MVP
      > Big things are made up
      > of lots of little things.
      >
      > "Poppy" <paul.diamond@N OSPAMthemedialo unge.com> wrote in message
      > news:OqZtFn77DH A.2404@TK2MSFTN GP11.phx.gbl...[color=green]
      > > I have a solution developed in VS.net.
      > >
      > > It has been pointed out to me that code behind pages cannot be altered[/color][/color]
      on[color=blue][color=green]
      > > the site as the solution would need recompiling to update the dll in the
      > > /bin folder.
      > >
      > > Unfortunatly there is 1 page on my site which I need to frequently[/color][/color]
      change[color=blue][color=green]
      > > slightly and I dont want to have to recompile every time.
      > >
      > > If I excluded this page from my project but uploaded it to my site could[/color][/color]
      I[color=blue][color=green]
      > > then alter it and see the changes ?
      > >
      > > Thanks in Advance
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • wh

        #4
        Re: Code behind query

        I think this is possible providing you exclude the page from your project.

        Assuming you have a page called "page.aspx" , VS.Net will add a directive
        similar to the following at the top of the file:

        <%@ Page language="c#" Codebehind="pag e.aspx.cs" AutoEventWireup ="false"
        Inherits="YourN amespace.Page" %>

        Assuming that you need to modify the code-behind file (in this case
        page.aspx.cs), just specify one additional 'src' parameter to the @page
        directive:

        <%@ Page language="c#" Codebehind="pag e.aspx.cs" AutoEventWireup ="false"
        Inherits="YourN amespace.Page" src="page.aspx. cs" %>

        This should instruct the .NET framework to compile page.aspx.cs the first
        time the page is accessed (or the first time that the code-behind file has
        been modified), ensuring that it uses the most up to date changes.

        Wayne.


        Comment

        • nfedin

          #5
          Re: Code behind query

          You do not need to compile your code behind files into the DLL in the
          /bin. Not having VS.Net, I don't know what the behavior of it is. My
          sites, I have the aspx/ascx page and then a corresponding code behind.
          I simply tell the page where the code behind is in the Page/Control
          directive, i.e.

          <%@ Page Language="VB" Src="CodeBehind/Default.aspx.vb "
          Inherits="Defau ltClass" %>

          When the page is changed, it gets recompiled it first referenced. I
          would do this.

          I do not know if this solution is faster than the compiled DLL.
          Others would be able to answer that.

          Neil



          "Poppy" <paul.diamond@N OSPAMthemedialo unge.com> wrote in message news:<OqZtFn77D HA.2404@TK2MSFT NGP11.phx.gbl>. ..[color=blue]
          > I have a solution developed in VS.net.
          >
          > It has been pointed out to me that code behind pages cannot be altered on
          > the site as the solution would need recompiling to update the dll in the
          > /bin folder.
          >
          > Unfortunatly there is 1 page on my site which I need to frequently change
          > slightly and I dont want to have to recompile every time.
          >
          > If I excluded this page from my project but uploaded it to my site could I
          > then alter it and see the changes ?
          >
          > Thanks in Advance[/color]

          Comment

          Working...