slow page load - empty code behind

Discussion in 'ASP .Net' started by Martin Eyles, Jun 5, 2006.

  1. Martin Eyles

    Martin Eyles Guest

    Hi,

    I have a .aspx page, but have not done any codeBehind for it. I use
    javascript to open this page, and on my development server this is fine.
    However, when I copy all the files to another server, and try running the
    same thing there, the page takes an age to load. (Note, the pop-up window
    opens quickly, but it takes a long time before the page opens in the
    pop-up).

    Does anyone have any idea why this is happening? Is there a problem with the
    way I am deploying the application (copying the files in a folder in my
    wwwroot to the other pc's wwwroot)?

    Thanks,
    Martin
    Martin Eyles, Jun 5, 2006
    #1
    1. Advertising

  2. Martin Eyles

    Martin Eyles Guest

    Also, I've noticed one of my scripts doesn't work on one PC, but works on
    another. After investigating, found that on one server, the form my script
    references gets the id "__aspnetForm" and on the other it gets the id
    "Menu1_Form1". Any ideas why the form name have different IDs?

    "Martin Eyles" <> wrote in message
    news:...
    > Hi,
    >
    > I have a .aspx page, but have not done any codeBehind for it. I use
    > javascript to open this page, and on my development server this is fine.
    > However, when I copy all the files to another server, and try running the
    > same thing there, the page takes an age to load. (Note, the pop-up window
    > opens quickly, but it takes a long time before the page opens in the
    > pop-up).
    >
    > Does anyone have any idea why this is happening? Is there a problem with
    > the way I am deploying the application (copying the files in a folder in
    > my wwwroot to the other pc's wwwroot)?
    >
    > Thanks,
    > Martin
    >
    Martin Eyles, Jun 5, 2006
    #2
    1. Advertising

  3. It sounds like ASP.NET is restarting. Is this only the first time that
    takes so long, right after you copy - or every time?

    "Martin Eyles" <> wrote in message
    news:...
    > Hi,
    >
    > I have a .aspx page, but have not done any codeBehind for it. I use
    > javascript to open this page, and on my development server this is fine.
    > However, when I copy all the files to another server, and try running the
    > same thing there, the page takes an age to load. (Note, the pop-up window
    > opens quickly, but it takes a long time before the page opens in the
    > pop-up).
    >
    > Does anyone have any idea why this is happening? Is there a problem with
    > the way I am deploying the application (copying the files in a folder in
    > my wwwroot to the other pc's wwwroot)?
    >
    > Thanks,
    > Martin
    >
    Marina Levit [MVP], Jun 5, 2006
    #3
  4. Martin Eyles

    Martin Eyles Guest

    "Marina Levit [MVP]" <> wrote in message
    news:...
    > It sounds like ASP.NET is restarting. Is this only the first time that
    > takes so long, right after you copy - or every time?


    It is quicker after the first time. Thanks for pointing this out.

    This is however was masking another problem, which I have put in a reply to
    the original message. any help there would also be appreciated.

    Martin

    > "Martin Eyles" <> wrote in message
    > news:...
    >> Hi,
    >>
    >> I have a .aspx page, but have not done any codeBehind for it. I use
    >> javascript to open this page, and on my development server this is fine.
    >> However, when I copy all the files to another server, and try running the
    >> same thing there, the page takes an age to load. (Note, the pop-up window
    >> opens quickly, but it takes a long time before the page opens in the
    >> pop-up).
    >>
    >> Does anyone have any idea why this is happening? Is there a problem with
    >> the way I am deploying the application (copying the files in a folder in
    >> my wwwroot to the other pc's wwwroot)?
    >>
    >> Thanks,
    >> Martin
    Martin Eyles, Jun 5, 2006
    #4
  5. Sorry, I've never heard of something like that happening. I don't know why
    the server would be generating a different name for the form based on the PC
    the request came from, unless you have some code there to change this.

    I would put together a very simple page, and see if the problem still
    happens. If not, I would see what this page is doing that would cause this
    type of effect.

    "Martin Eyles" <> wrote in message
    news:...
    > "Marina Levit [MVP]" <> wrote in message
    > news:...
    >> It sounds like ASP.NET is restarting. Is this only the first time that
    >> takes so long, right after you copy - or every time?

    >
    > It is quicker after the first time. Thanks for pointing this out.
    >
    > This is however was masking another problem, which I have put in a reply
    > to the original message. any help there would also be appreciated.
    >
    > Martin
    >
    >> "Martin Eyles" <> wrote in message
    >> news:...
    >>> Hi,
    >>>
    >>> I have a .aspx page, but have not done any codeBehind for it. I use
    >>> javascript to open this page, and on my development server this is fine.
    >>> However, when I copy all the files to another server, and try running
    >>> the same thing there, the page takes an age to load. (Note, the pop-up
    >>> window opens quickly, but it takes a long time before the page opens in
    >>> the pop-up).
    >>>
    >>> Does anyone have any idea why this is happening? Is there a problem with
    >>> the way I am deploying the application (copying the files in a folder in
    >>> my wwwroot to the other pc's wwwroot)?
    >>>
    >>> Thanks,
    >>> Martin

    >
    >
    Marina Levit [MVP], Jun 5, 2006
    #5
  6. Martin Eyles

    Martin Eyles Guest

    OK, I have taken a look at the system. The way it works is that there is a
    page, and 1 custom control. The main page doesn't have a form, but the
    control does. The name of the form on my development server is __aspnetForm,
    and the name of the form on the server I deploy to is of the form
    controlInstanceName_Form1.

    Does this help the diagnosis?

    Thanks,
    Martin

    "Marina Levit [MVP]" <> wrote in message
    news:...
    > Sorry, I've never heard of something like that happening. I don't know
    > why the server would be generating a different name for the form based on
    > the PC the request came from, unless you have some code there to change
    > this.
    >
    > I would put together a very simple page, and see if the problem still
    > happens. If not, I would see what this page is doing that would cause
    > this type of effect.
    >
    > "Martin Eyles" <> wrote in message
    > news:...
    >> "Marina Levit [MVP]" <> wrote in message
    >> news:...
    >>> It sounds like ASP.NET is restarting. Is this only the first time that
    >>> takes so long, right after you copy - or every time?

    >>
    >> It is quicker after the first time. Thanks for pointing this out.
    >>
    >> This is however was masking another problem, which I have put in a reply
    >> to the original message. any help there would also be appreciated.
    >>
    >> Martin
    >>
    >>> "Martin Eyles" <> wrote in message
    >>> news:...
    >>>> Hi,
    >>>>
    >>>> I have a .aspx page, but have not done any codeBehind for it. I use
    >>>> javascript to open this page, and on my development server this is
    >>>> fine. However, when I copy all the files to another server, and try
    >>>> running the same thing there, the page takes an age to load. (Note, the
    >>>> pop-up window opens quickly, but it takes a long time before the page
    >>>> opens in the pop-up).
    >>>>
    >>>> Does anyone have any idea why this is happening? Is there a problem
    >>>> with the way I am deploying the application (copying the files in a
    >>>> folder in my wwwroot to the other pc's wwwroot)?
    >>>>
    >>>> Thanks,
    >>>> Martin

    >>
    >>

    >
    >
    Martin Eyles, Jun 5, 2006
    #6
  7. What if someone placed 2 of these controls on one page? You would end up
    with 2 server side forms - which you can't have.

    The typical way this is handled, is to have the form on the page, and the
    user control, or web control, is simply placed on the page and becomes part
    of its form.

    "Martin Eyles" <> wrote in message
    news:...
    > OK, I have taken a look at the system. The way it works is that there is a
    > page, and 1 custom control. The main page doesn't have a form, but the
    > control does. The name of the form on my development server is
    > __aspnetForm, and the name of the form on the server I deploy to is of the
    > form controlInstanceName_Form1.
    >
    > Does this help the diagnosis?
    >
    > Thanks,
    > Martin
    >
    > "Marina Levit [MVP]" <> wrote in message
    > news:...
    >> Sorry, I've never heard of something like that happening. I don't know
    >> why the server would be generating a different name for the form based on
    >> the PC the request came from, unless you have some code there to change
    >> this.
    >>
    >> I would put together a very simple page, and see if the problem still
    >> happens. If not, I would see what this page is doing that would cause
    >> this type of effect.
    >>
    >> "Martin Eyles" <> wrote in message
    >> news:...
    >>> "Marina Levit [MVP]" <> wrote in message
    >>> news:...
    >>>> It sounds like ASP.NET is restarting. Is this only the first time that
    >>>> takes so long, right after you copy - or every time?
    >>>
    >>> It is quicker after the first time. Thanks for pointing this out.
    >>>
    >>> This is however was masking another problem, which I have put in a reply
    >>> to the original message. any help there would also be appreciated.
    >>>
    >>> Martin
    >>>
    >>>> "Martin Eyles" <> wrote in message
    >>>> news:...
    >>>>> Hi,
    >>>>>
    >>>>> I have a .aspx page, but have not done any codeBehind for it. I use
    >>>>> javascript to open this page, and on my development server this is
    >>>>> fine. However, when I copy all the files to another server, and try
    >>>>> running the same thing there, the page takes an age to load. (Note,
    >>>>> the pop-up window opens quickly, but it takes a long time before the
    >>>>> page opens in the pop-up).
    >>>>>
    >>>>> Does anyone have any idea why this is happening? Is there a problem
    >>>>> with the way I am deploying the application (copying the files in a
    >>>>> folder in my wwwroot to the other pc's wwwroot)?
    >>>>>
    >>>>> Thanks,
    >>>>> Martin
    >>>
    >>>

    >>
    >>

    >
    >
    Marina Levit [MVP], Jun 5, 2006
    #7
  8. Martin Eyles

    Martin Eyles Guest

    "Marina Levit [MVP]" <> wrote in message
    news:%23w$...
    > What if someone placed 2 of these controls on one page? You would end up
    > with 2 server side forms - which you can't have.


    Why not?

    > The typical way this is handled, is to have the form on the page, and the
    > user control, or web control, is simply placed on the page and becomes
    > part of its form.


    OK, will try this, and will hopefully work. Thanks.

    > "Martin Eyles" <> wrote in message
    > news:...
    >> OK, I have taken a look at the system. The way it works is that there is
    >> a page, and 1 custom control. The main page doesn't have a form, but the
    >> control does. The name of the form on my development server is
    >> __aspnetForm, and the name of the form on the server I deploy to is of
    >> the form controlInstanceName_Form1.
    >>
    >> "Marina Levit [MVP]" <> wrote in message
    >> news:...
    >>> Sorry, I've never heard of something like that happening. I don't know
    >>> why the server would be generating a different name for the form based
    >>> on the PC the request came from, unless you have some code there to
    >>> change this.
    >>>
    >>> I would put together a very simple page, and see if the problem still
    >>> happens. If not, I would see what this page is doing that would cause
    >>> this type of effect.
    >>>
    >>> "Martin Eyles" <> wrote in message
    >>> news:...
    >>>>
    >>>> This is however was masking another problem, which I have put in a
    >>>> reply to the original message. any help there would also be
    >>>> appreciated.
    Martin Eyles, Jun 6, 2006
    #8
  9. Martin Eyles

    Martin Eyles Guest

    "Martin Eyles" <> wrote in message
    news:...
    > "Marina Levit [MVP]" <> wrote in message
    > news:%23w$...
    >> The typical way this is handled, is to have the form on the page, and the
    >> user control, or web control, is simply placed on the page and becomes
    >> part of its form.

    >
    > OK, will try this, and will hopefully work. Thanks.


    Works beautifully. I now have a form with id="Form1" on all pages.

    Once again, thanks! :)

    Martin

    >> "Martin Eyles" <> wrote in message
    >> news:...
    >>> OK, I have taken a look at the system. The way it works is that there is
    >>> a page, and 1 custom control. The main page doesn't have a form, but the
    >>> control does. The name of the form on my development server is
    >>> __aspnetForm, and the name of the form on the server I deploy to is of
    >>> the form controlInstanceName_Form1.
    >>>
    >>> "Marina Levit [MVP]" <> wrote in message
    >>> news:...
    >>>> Sorry, I've never heard of something like that happening. I don't know
    >>>> why the server would be generating a different name for the form based
    >>>> on the PC the request came from, unless you have some code there to
    >>>> change this.
    >>>>
    >>>> I would put together a very simple page, and see if the problem still
    >>>> happens. If not, I would see what this page is doing that would cause
    >>>> this type of effect.
    >>>>
    >>>> "Martin Eyles" <> wrote in message
    >>>> news:...
    >>>>>
    >>>>> This is however was masking another problem, which I have put in a
    >>>>> reply to the original message. any help there would also be
    >>>>> appreciated.
    Martin Eyles, Jun 6, 2006
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Miller [msft]

    Re: Code Behind vs. no code behind: error

    Ben Miller [msft], Jun 27, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    568
    Alphonse Giambrone
    Jun 28, 2003
  2. Daniel Manes

    Code-Behind Pain in the Behind!

    Daniel Manes, Jun 10, 2005, in forum: ASP .Net
    Replies:
    11
    Views:
    642
  3. Rob R. Ainscough
    Replies:
    2
    Views:
    6,638
    Rob R. Ainscough
    Apr 4, 2006
  4. John

    Non-code behind to code behind

    John, Feb 19, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    465
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Feb 19, 2007
  5. ABHIJIT B
    Replies:
    2
    Views:
    6,980
    ABHIJIT B
    Mar 7, 2008
Loading...

Share This Page