Problem loading asp.net usercontrols dynamically with hyperlinks and images

B

Brett

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
(e-mail address removed)
 
B

Brett

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
(e-mail address removed)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top