<embed> referenced page called 2 times

C

Cris Curtis

When I use an embed tag that uses a dynamic aspx page, the dynamic aspx page
appears to get called 2 times instead.


Below is code that adds an embed tag to a placeholder control that will use
a second aspx page to generate the svg for the embed.


svgchart.Controls.Clear();
string strSRC = "./DesktopModules/Enterprise/BusinessRuleSVG.aspx";
string HTML = "<EMBED SRC='" + strSRC + "' NAME='SVGEmbed' HEIGHT='450'
WIDTH='900' TYPE='image/svg+xml'
PLUGINSPAGE='http://www.adobe.com/svg/viewer/install/'>";
svgchart.Controls.Add(new LiteralControl(HTML));

The BusinessRuleSVG page will then get called 2 times instead of the
expected 1 time. Has anyone else experienced a problem such as this? I
have seen examples of users generating dynamic graphic files using the embed
tag, but not SVG files.

Any assistance is appreciated.

Thanks,
Cris
 
S

Swanand Mokashi

set AutoEventWireup="false" in the Page directive
eg
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="YourPage.aspx.vb"
Inherits="YourApp.PageClassName" %>

HTH
 
C

Cris Curtis

Thanks,

I did have AutoEventWireup = "False" but that got me looking at my other
page directives and found that I had set SmartNavigation="true" on the
parent page
which will of course make the embed call 2 times. My code is in a child
control and it would have taken me a long time without the tip to start
looking at the page directives.

Thanks again,
Cris
 

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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top