Problem loading asp.net usercontrols dynamically with hyperlinks and images

Discussion in 'ASP .Net' started by Brett, Sep 9, 2004.

  1. Brett

    Brett Guest

    Hi,
    Here's a strange one:

    I have built a single page model for a website, that uses 3 panel
    controls which load usercontrols dynamically, based on the querystring
    PageMode parameter that you pass. For instance, if you pass
    PageMode=home, it will show the home page view, and so on.

    On the left panel I display a menu usercontrol that is a table
    consisting of a list of hyperlinks (a href, not link buttons) and some
    images.

    When I click on a hyperlink, it redirects to the querystring
    appropriately and loads the controls. However, it fires the page_load
    event twice!

    When I remove the images from the menu usercontrol, it behaves
    correctly, only firing page_load once.

    Any thoughts on this? Seems like a bug to me/!!


    Cheers,
    Brett Raven


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Brett, Sep 9, 2004
    #1
    1. Advertising

  2. Brett

    Brett Guest

    Arrgh! Never mind. I found that one of the images tags had an old
    coldfusion tag within it.

    <img src='#request.urlroot#/images/trans.gif' />

    For some reason this fired off the page load twice. I guess the CF
    engine read it somehow and reacted to it.

    Ahh the dangers of cut and paste > :)

    Cheers,
    Brett Raven


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Brett, Sep 9, 2004
    #2
    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. Hendrik W. Hansen

    Loading UserControls dynamically

    Hendrik W. Hansen, Oct 28, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    412
    Hendrik W. Hansen
    Oct 28, 2003
  2. Sundaresan
    Replies:
    1
    Views:
    321
    Natty Gur
    Nov 23, 2003
  3. Darrel
    Replies:
    3
    Views:
    3,923
    Darrel
    Nov 8, 2004
  4. =?Utf-8?B?U2FyYWggU2FyYWg=?=

    hyperlinks and images

    =?Utf-8?B?U2FyYWggU2FyYWg=?=, Feb 27, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    2,132
    =?Utf-8?B?U2FyYWggU2FyYWg=?=
    Mar 2, 2006
  5. Hendrik W. Hansen

    Dynamically loading and adding usercontrols after CreateChildControls

    Hendrik W. Hansen, May 28, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    382
Loading...

Share This Page