page_init executing twice

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

  1. #1

    Default page_init executing twice

    I am experiencing a weird problem with some buttons on my
    webpage. The page_init is executing twice when a button is
    clicked.

    If I replace the button for a Linkbutton the page_init
    only loads once.

    I've set the Autoeventwireup to false.

    Could it be a framework problem ? On other computers the
    bug is difficult to reproduce but on mine the problem is
    constant. I am using framework version 1.0 with SP2.

    Thanks for your help
    mart Guest

  2. Similar Questions and Discussions

    1. Init Handler Not Firing After Page_Init
      Hello to all of you geniuses, I'm having a problem trying to get an Init handler to fire for a Placeholder control at the initialization phase....
    2. executing SQL query using ASP?
      Hi, I've got the following problem and I don't know how to make this (if it's possible at all): I want to make a form where the user can enter...
    3. difference between constructor and Page_Init()
      Hi, what is the difference between the page-constructor and Page_Init() ? when to put what code where ? thanks chris
    4. Using inheritance for web pages - why have a Page_Init when you can override OnInit?
      I'm trying to better understand the use of inheritance vs. the implementation of a handler. I wanted to ask this question to the newsgroup. Each...
    5. Page_Init() and Page_Load()
      Hi, what is the purpose of having a Page_Init() AND a Page_Load() event handler 'cause both will always be executed on loading a page ? What...
  3. #2

    Default Re: page_init executing twice

    I noticed that too in a vb.net project under visual studio.net 2010
    I suspect that the page_init of an ascx is called the first time a control is showed on an aspx page and each time that a property of the control is set and maybe read.
    That has to be confirmed or not.
    Just some clues.
    See ya
    Dillinger974

    Quote Originally Posted by mart View Post
    I am experiencing a weird problem with some buttons on my
    webpage. The page_init is executing twice when a button is
    clicked.

    If I replace the button for a Linkbutton the page_init
    only loads once.

    I've set the Autoeventwireup to false.

    Could it be a framework problem ? On other computers the
    bug is difficult to reproduce but on mine the problem is
    constant. I am using framework version 1.0 with SP2.

    Thanks for your help
    974geekmasta 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