Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Codebehind problem

    I have created a user control that gets loaded by a page.
    The user control has a codebehind, but when I change the
    code on the codebehind, it never runs.
    If on the other hand a run the same code on the .ascx
    file it runs with no problems.
    The directive(see below) was added automatically by
    VS.NET so I can't seam to know what the problem is. Any
    thoughts?
    Francisco

    <%@ Control Language="vb" AutoEventWireup="False"
    Codebehind="idx_CSS.ascx.vb" Inherits="nova.idx_CSS"
    TargetSchema="http://schemas.microsoft.com/intellisense/ie
    5" %>

    Francisco Carvalho Guest

  2. Similar Questions and Discussions

    1. Data set in Codebehind
      When using dreamweaver for asp.net and VB can anyone tell me how to access the dataset (that DW created MM:Dataset ) in the code behind. All...
    2. Datagrid SelectedIndexChanged Problem in CodeBehind
      I am attempting to use the SelectedIndexChanged to detect when a row has been selected. I have seen many examples where they are writing all the...
    3. Why does VS.NET use codebehind?
      I'm reading the Essential ASP.NET book by Fritz onion and he says that when VS.NET creates a new .aspx page for you is uses the codebehind attribute...
    4. Popup in codebehind
      Hi. Is it possible to create a popup window (or something similar) from codebehind? Like after pressing a button and if som conditions is...
    5. src Versus codebehind
      hello friend, while developing an application, i encountered a subtle point. for a aspx page, what is the difference between src property and...
  3. #2

    Default Re: Codebehind problem

    Francisco,
    You need to rebuild the project in VS.NET. Using the VS.NET code behind
    model pre-compiles all of the code behind files into a single assembly,
    located in your /bin folder. If you change the code in the code-behind
    file, ASP.NET still uses the compiled assembly, so until you rebuild the
    project (and thus compile the assembly), nothing is changed. On the other
    hand, the ascx file is always parsed from the actual file, so changes there
    are reflected immediately.

    Ryan


    "Francisco Carvalho" <fcarvalho@carf.org> wrote in message
    news:04f101c34cac$f3cfbeb0$a301280a@phx.gbl...
    > I have created a user control that gets loaded by a page.
    > The user control has a codebehind, but when I change the
    > code on the codebehind, it never runs.
    > If on the other hand a run the same code on the .ascx
    > file it runs with no problems.
    > The directive(see below) was added automatically by
    > VS.NET so I can't seam to know what the problem is. Any
    > thoughts?
    > Francisco
    >
    > <%@ Control Language="vb" AutoEventWireup="False"
    > Codebehind="idx_CSS.ascx.vb" Inherits="nova.idx_CSS"
    > TargetSchema="http://schemas.microsoft.com/intellisense/ie
    > 5" %>
    >

    Ryan Gregg Guest

  4. #3

    Default Re: Codebehind problem

    Hi Ryan,

    Thanks for the reply. I did rebuil the solution, but with
    no success. I then deleted the dll from within the VS.NET
    enviroment and build the project. That recreated the dll,
    which fixed the probelm. Thanks a lot.

    Francisco
    >-----Original Message-----
    >Francisco,
    > You need to rebuild the project in VS.NET. Using
    the VS.NET code behind
    >model pre-compiles all of the code behind files into a
    single assembly,
    >located in your /bin folder. If you change the code in
    the code-behind
    >file, ASP.NET still uses the compiled assembly, so until
    you rebuild the
    >project (and thus compile the assembly), nothing is
    changed. On the other
    >hand, the ascx file is always parsed from the actual
    file, so changes there
    >are reflected immediately.
    >
    >Ryan
    >
    >
    >"Francisco Carvalho" <fcarvalho@carf.org> wrote in
    message
    >news:04f101c34cac$f3cfbeb0$a301280a@phx.gbl...
    >> I have created a user control that gets loaded by a
    page.
    >> The user control has a codebehind, but when I change
    the
    >> code on the codebehind, it never runs.
    >> If on the other hand a run the same code on the .ascx
    >> file it runs with no problems.
    >> The directive(see below) was added automatically by
    >> VS.NET so I can't seam to know what the problem is. Any
    >> thoughts?
    >> Francisco
    >>
    >> <%@ Control Language="vb" AutoEventWireup="False"
    >> Codebehind="idx_CSS.ascx.vb" Inherits="nova.idx_CSS"
    >>
    TargetSchema="http://schemas.microsoft.com/intellisense/ie
    >> 5" %>
    >>
    >
    >
    >.
    >
    Francisco Carvalho Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139