Showing posts with label image. Show all posts
Showing posts with label image. Show all posts

Thursday, March 29, 2012

server side rendering of the OWC 11 chart... sample?

Hi,
I'm looking for a sample code to generates a PNG (or Gif..) image from an
OWC chart object connected to an OLAP cube.
I'll generates an MDX command dynamically and I want to display a simple
chart (pie, column, etc...)
thanks for your guides, my google search return nothing useable for the
moment.
Jerome.google this newsgroup there is plenty of documentation in here
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @. www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
----
"Jj" <willgart@.BBBhotmailAAA.com> wrote in message
news:eJN9tjKIGHA.2948@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I'm looking for a sample code to generates a PNG (or Gif..) image from an
> OWC chart object connected to an OLAP cube.
> I'll generates an MDX command dynamically and I want to display a simple
> chart (pie, column, etc...)
> thanks for your guides, my google search return nothing useable for the
> moment.
> Jerome.
>
all my searches return nothing good for me.
any good link in mind?
"Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> wrote in message
news:etc%23BVRIGHA.208@.tk2msftngp13.phx.gbl...
> google this newsgroup there is plenty of documentation in here
> --
> Regards,
> Alvin Bruney [MVP ASP.NET]
> [Shameless Author plug]
> The Microsoft Office Web Components Black Book with .NET
> Now Available @. www.lulu.com/owc
> Forth-coming VSTO.NET - Wrox/Wiley 2006
> ----
>
> "Jj" <willgart@.BBBhotmailAAA.com> wrote in message
> news:eJN9tjKIGHA.2948@.TK2MSFTNGP10.phx.gbl...
>
Chart.ExportPicture ?
http://msdn.microsoft.com/library/d..._HV05259733.asp
my 2 cents ;)
-= Tonio =-
well... after some work I have a first version of my control...
"Antoine Prevot" <AntoinePrevot@.discussions.microsoft.com> wrote in message
news:19BCEE08-C569-4CFC-8530-2335AA8CEC45@.microsoft.com...
> Chart.ExportPicture ?
> http://msdn.microsoft.com/library/d..._HV05259733.asp
> my 2 cents ;)
> --
> -= Tonio =-
>

server side rendering of the OWC 11 chart... sample?

Hi,

I'm looking for a sample code to generates a PNG (or Gif..) image from an
OWC chart object connected to an OLAP cube.

I'll generates an MDX command dynamically and I want to display a simple
chart (pie, column, etc...)

thanks for your guides, my google search return nothing useable for the
moment.

Jerome.google this newsgroup there is plenty of documentation in here

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @. www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-----------------

"Jj" <willgart@.BBBhotmailAAA.com> wrote in message
news:eJN9tjKIGHA.2948@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I'm looking for a sample code to generates a PNG (or Gif..) image from an
> OWC chart object connected to an OLAP cube.
> I'll generates an MDX command dynamically and I want to display a simple
> chart (pie, column, etc...)
> thanks for your guides, my google search return nothing useable for the
> moment.
> Jerome.
all my searches return nothing good for me.

any good link in mind?

"Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> wrote in message
news:etc%23BVRIGHA.208@.tk2msftngp13.phx.gbl...
> google this newsgroup there is plenty of documentation in here
> --
> Regards,
> Alvin Bruney [MVP ASP.NET]
> [Shameless Author plug]
> The Microsoft Office Web Components Black Book with .NET
> Now Available @. www.lulu.com/owc
> Forth-coming VSTO.NET - Wrox/Wiley 2006
> -----------------
>
> "Jj" <willgart@.BBBhotmailAAA.com> wrote in message
> news:eJN9tjKIGHA.2948@.TK2MSFTNGP10.phx.gbl...
>> Hi,
>>
>> I'm looking for a sample code to generates a PNG (or Gif..) image from an
>> OWC chart object connected to an OLAP cube.
>>
>> I'll generates an MDX command dynamically and I want to display a simple
>> chart (pie, column, etc...)
>>
>> thanks for your guides, my google search return nothing useable for the
>> moment.
>>
>> Jerome.
>>
>>
Chart.ExportPicture ?

http://msdn.microsoft.com/library/d..._HV05259733.asp

my 2 cents ;)

--
-= Tonio =-
well... after some work I have a first version of my control...

"Antoine Prevot" <AntoinePrevot@.discussions.microsoft.com> wrote in message
news:19BCEE08-C569-4CFC-8530-2335AA8CEC45@.microsoft.com...
> Chart.ExportPicture ?
> http://msdn.microsoft.com/library/d..._HV05259733.asp
> my 2 cents ;)
> --
> -= Tonio =-

Monday, March 26, 2012

Server tag not well formed error.

I have created a custom image control everything works fine. It renders in the browser fine.

But when I drop the control in the webform, set the properties, go to html view, then back to design view. I get a gray box where my custom control was that says "Error Creating Custom Control" and then a message of "Server Tag is not well formed".

Anyone know why this would happen?
Here is how it looks in HMTL view from within the IDE.

<JHA:JHAImageRollover id="JHAImageRollover1" onclick="http://www.google.com" runat="server" BaseImage="/common/images/btn_search.gif" RolloverImage="/common/images/btn_cancel.gif"></JHA:JHAImageRollover>Is there are <@.Register > tag on the top of the .aspx page that the control is on?

My guess is the page doesn't know anything about the control since its library is not registered with the page.

<%@. Register TagPrefix="jh1" Namespace="YourControlLibraryNamespace" Assembly="YourControlLibrary" %>
Got it fixed...strange though.

The TagPrefix in the page directive was "jha"
it was yelling because the control had "JHA"

go figure!?

Server tags cannot contain <% ... %> constructs

Hi,

I've put a appSetting tag into my web.config, but when I try to catch its
value to my Image WebControl occurs the follow error: "Server tags cannot
contain <% ... %> constructs."

on myPage.aspx (Notice the ImageUrl tag):
<asp:Image id="Image1" runat="server"
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgSi
stema"]%> /
So, What's wrong with my ImageUrl attribution?
Is there any way to do that?

thanks a lot
Marcosyou can set this property programmatically within a server script block:
Image1.ImageUrl =
System.Configuration.ConfigurationSettings.AppSett ings....
you cannot use <%%> inside a web control as web controls already run at the
server.
sharon.

"Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
news:ulbiAAmIEHA.3240@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I've put a appSetting tag into my web.config, but when I try to catch its
> value to my Image WebControl occurs the follow error: "Server tags cannot
> contain <% ... %> constructs."
> on myPage.aspx (Notice the ImageUrl tag):
> <asp:Image id="Image1" runat="server"
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgSi
> stema"]%> />
> So, What's wrong with my ImageUrl attribution?
> Is there any way to do that?
> thanks a lot
> Marcos
Thanks... but, I'd like to do it inside my .aspx file...

Isn't it possible?

tanks
Marcos

"Sharon" <talsharon@.hotmail.com> escreveu na mensagem
news:OvBFDJmIEHA.3128@.TK2MSFTNGP10.phx.gbl...
> you can set this property programmatically within a server script block:
> Image1.ImageUrl =
> System.Configuration.ConfigurationSettings.AppSett ings....
> you cannot use <%%> inside a web control as web controls already run at
the
> server.
> sharon.
> "Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
> news:ulbiAAmIEHA.3240@.TK2MSFTNGP12.phx.gbl...
> > Hi,
> > I've put a appSetting tag into my web.config, but when I try to catch
its
> > value to my Image WebControl occurs the follow error: "Server tags
cannot
> > contain <% ... %> constructs."
> > on myPage.aspx (Notice the ImageUrl tag):
> > <asp:Image id="Image1" runat="server"
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgSi
> > stema"]%> />
> > So, What's wrong with my ImageUrl attribution?
> > Is there any way to do that?
> > thanks a lot
> > Marcos
i don't know of any way, and there is no reason to do it inside the html
section.
one of the ideas behind web controls design, is the separation of code from
html.

"Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
news:e0ARXWmIEHA.364@.TK2MSFTNGP11.phx.gbl...
> Thanks... but, I'd like to do it inside my .aspx file...
> Isn't it possible?
> tanks
> Marcos
> "Sharon" <talsharon@.hotmail.com> escreveu na mensagem
> news:OvBFDJmIEHA.3128@.TK2MSFTNGP10.phx.gbl...
> > you can set this property programmatically within a server script block:
> > Image1.ImageUrl =
> > System.Configuration.ConfigurationSettings.AppSett ings....
> > you cannot use <%%> inside a web control as web controls already run at
> the
> > server.
> > sharon.
> > "Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
> > news:ulbiAAmIEHA.3240@.TK2MSFTNGP12.phx.gbl...
> > > Hi,
> > > > I've put a appSetting tag into my web.config, but when I try to catch
> its
> > > value to my Image WebControl occurs the follow error: "Server tags
> cannot
> > > contain <% ... %> constructs."
> > > > on myPage.aspx (Notice the ImageUrl tag):
> > > <asp:Image id="Image1" runat="server"
> ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgSi
> > > stema"]%> />
> > > > So, What's wrong with my ImageUrl attribution?
> > > Is there any way to do that?
> > > > thanks a lot
> > > Marcos
> >
use the binding syntax <%# bindingexpression %
-- bruce (sqlwork.com)

"Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
news:ulbiAAmIEHA.3240@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I've put a appSetting tag into my web.config, but when I try to catch its
> value to my Image WebControl occurs the follow error: "Server tags cannot
> contain <% ... %> constructs."
> on myPage.aspx (Notice the ImageUrl tag):
> <asp:Image id="Image1" runat="server"
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgSi
> stema"]%> />
> So, What's wrong with my ImageUrl attribution?
> Is there any way to do that?
> thanks a lot
> Marcos
In your code there are some errors :

The <%= construct can only be used in client script for write some value
from server (like old ASP).
your Image is server side not in client side!!!!

You can use the <%# construct. This is for binding value!
<asp:Image id="Image1" runat="server"
ImageUrl='<%#System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgS
istema"]%>' /
this code require a DataBind() method call!!!

Brun

"Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
news:ulbiAAmIEHA.3240@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I've put a appSetting tag into my web.config, but when I try to catch its
> value to my Image WebControl occurs the follow error: "Server tags cannot
> contain <% ... %> constructs."
> on myPage.aspx (Notice the ImageUrl tag):
> <asp:Image id="Image1" runat="server"
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgSi
> stema"]%> />
> So, What's wrong with my ImageUrl attribution?
> Is there any way to do that?
> thanks a lot
> Marcos

Server tags cannot contain <% ... %> constructs

Hi,

I've put a appSetting tag into my web.config, but when I try to catch its
value to my Image WebControl occurs the follow error: "Server tags cannot
contain <% ... %> constructs."

on myPage.aspx (Notice the ImageUrl tag):
<asp:Image id="Image1" runat="server"
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgSi
stema"]%> /
So, What's wrong with my ImageUrl attribution?
Is there any way to do that?

thanks a lot
Marcosyou can set this property programmatically within a server script block:
Image1.ImageUrl =
System.Configuration.ConfigurationSettings.AppSett ings....
you cannot use <%%> inside a web control as web controls already run at the
server.
sharon.

"Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
news:ulbiAAmIEHA.3240@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I've put a appSetting tag into my web.config, but when I try to catch its
> value to my Image WebControl occurs the follow error: "Server tags cannot
> contain <% ... %> constructs."
> on myPage.aspx (Notice the ImageUrl tag):
> <asp:Image id="Image1" runat="server"
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgSi
> stema"]%> />
> So, What's wrong with my ImageUrl attribution?
> Is there any way to do that?
> thanks a lot
> Marcos
Thanks... but, I'd like to do it inside my .aspx file...

Isn't it possible?

tanks
Marcos

"Sharon" <talsharon@.hotmail.com> escreveu na mensagem
news:OvBFDJmIEHA.3128@.TK2MSFTNGP10.phx.gbl...
> you can set this property programmatically within a server script block:
> Image1.ImageUrl =
> System.Configuration.ConfigurationSettings.AppSett ings....
> you cannot use <%%> inside a web control as web controls already run at
the
> server.
> sharon.
> "Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
> news:ulbiAAmIEHA.3240@.TK2MSFTNGP12.phx.gbl...
> > Hi,
> > I've put a appSetting tag into my web.config, but when I try to catch
its
> > value to my Image WebControl occurs the follow error: "Server tags
cannot
> > contain <% ... %> constructs."
> > on myPage.aspx (Notice the ImageUrl tag):
> > <asp:Image id="Image1" runat="server"
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgSi
> > stema"]%> />
> > So, What's wrong with my ImageUrl attribution?
> > Is there any way to do that?
> > thanks a lot
> > Marcos
i don't know of any way, and there is no reason to do it inside the html
section.
one of the ideas behind web controls design, is the separation of code from
html.

"Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
news:e0ARXWmIEHA.364@.TK2MSFTNGP11.phx.gbl...
> Thanks... but, I'd like to do it inside my .aspx file...
> Isn't it possible?
> tanks
> Marcos
> "Sharon" <talsharon@.hotmail.com> escreveu na mensagem
> news:OvBFDJmIEHA.3128@.TK2MSFTNGP10.phx.gbl...
> > you can set this property programmatically within a server script block:
> > Image1.ImageUrl =
> > System.Configuration.ConfigurationSettings.AppSett ings....
> > you cannot use <%%> inside a web control as web controls already run at
> the
> > server.
> > sharon.
> > "Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
> > news:ulbiAAmIEHA.3240@.TK2MSFTNGP12.phx.gbl...
> > > Hi,
> > > > I've put a appSetting tag into my web.config, but when I try to catch
> its
> > > value to my Image WebControl occurs the follow error: "Server tags
> cannot
> > > contain <% ... %> constructs."
> > > > on myPage.aspx (Notice the ImageUrl tag):
> > > <asp:Image id="Image1" runat="server"
> ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgSi
> > > stema"]%> />
> > > > So, What's wrong with my ImageUrl attribution?
> > > Is there any way to do that?
> > > > thanks a lot
> > > Marcos
> >
use the binding syntax <%# bindingexpression %
-- bruce (sqlwork.com)

"Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
news:ulbiAAmIEHA.3240@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I've put a appSetting tag into my web.config, but when I try to catch its
> value to my Image WebControl occurs the follow error: "Server tags cannot
> contain <% ... %> constructs."
> on myPage.aspx (Notice the ImageUrl tag):
> <asp:Image id="Image1" runat="server"
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgSi
> stema"]%> />
> So, What's wrong with my ImageUrl attribution?
> Is there any way to do that?
> thanks a lot
> Marcos
In your code there are some errors :

The <%= construct can only be used in client script for write some value
from server (like old ASP).
your Image is server side not in client side!!!!

You can use the <%# construct. This is for binding value!
<asp:Image id="Image1" runat="server"
ImageUrl='<%#System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgS
istema"]%>' /
this code require a DataBind() method call!!!

Brun

"Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
news:ulbiAAmIEHA.3240@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I've put a appSetting tag into my web.config, but when I try to catch its
> value to my Image WebControl occurs the follow error: "Server tags cannot
> contain <% ... %> constructs."
> on myPage.aspx (Notice the ImageUrl tag):
> <asp:Image id="Image1" runat="server"
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgSi
> stema"]%> />
> So, What's wrong with my ImageUrl attribution?
> Is there any way to do that?
> thanks a lot
> Marcos

Quote:

Originally Posted by Bruno Sirianni

In your code there are some errors :

The <%= construct can only be used in client script for write some value
from server (like old ASP).
your Image is server side not in client side!!!!

You can use the <%# construct. This is for binding value!
<asp:Image id="Image1" runat="server"
ImageUrl='<%#System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgS
istema"]%>' /
this code require a DataBind() method call!!!

Brun

"Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
news:ulbiAAmIEHA.3240@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I've put a appSetting tag into my web.config, but when I try to catch its
> value to my Image WebControl occurs the follow error: "Server tags cannot
> contain <% ... %> constructs."
> on myPage.aspx (Notice the ImageUrl tag):
> <asp:Image id="Image1" runat="server"
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSe ttings["SrcImgSi
> stema"]%> />
> So, What's wrong with my ImageUrl attribution?
> Is there any way to do that?
> thanks a lot
> Marcos
>

In ASP.NET 2.0 not only can you refer to appSettings declaratively (without using the DataBinding syntax), which is precisely what you are trying to do here, but you can create an ExpressionBuilder that lets you run arbitrary code declaratively, which is precisely what you tried to do. Check it out here: http://infinitiesloop.blogspot.com/

Server tags cannot contain <% ... %> constructs

Hi,
I've put a appSetting tag into my web.config, but when I try to catch its
value to my Image WebControl occurs the follow error: "Server tags cannot
contain <% ... %> constructs."
on myPage.aspx (Notice the ImageUrl tag):
<asp:Image id="Image1" runat="server"
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSettings["SrcI
mgSi
stema"]%> />
So, What's wrong with my ImageUrl attribution?
Is there any way to do that?
thanks a lot
Marcosyou can set this property programmatically within a server script block:
Image1.ImageUrl =
System.Configuration.ConfigurationSettings.AppSettings....
you cannot use <%%> inside a web control as web controls already run at the
server.
sharon.
"Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
news:ulbiAAmIEHA.3240@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I've put a appSetting tag into my web.config, but when I try to catch its
> value to my Image WebControl occurs the follow error: "Server tags cannot
> contain <% ... %> constructs."
> on myPage.aspx (Notice the ImageUrl tag):
> <asp:Image id="Image1" runat="server"
>
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSettings["SrcImgSired">
> stema"]%> />
> So, What's wrong with my ImageUrl attribution?
> Is there any way to do that?
> thanks a lot
> Marcos
>
Thanks... but, I'd like to do it inside my .aspx file...
Isn't it possible?
tanks
Marcos
"Sharon" <talsharon@.hotmail.com> escreveu na mensagem
news:OvBFDJmIEHA.3128@.TK2MSFTNGP10.phx.gbl...
> you can set this property programmatically within a server script block:
> Image1.ImageUrl =
> System.Configuration.ConfigurationSettings.AppSettings....
> you cannot use <%%> inside a web control as web controls already run at
the
> server.
> sharon.
> "Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
> news:ulbiAAmIEHA.3240@.TK2MSFTNGP12.phx.gbl...
its
cannot
>
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSettings["SrcImgSired">
>
i don't know of any way, and there is no reason to do it inside the html
section.
one of the ideas behind web controls design, is the separation of code from
html.
"Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
news:e0ARXWmIEHA.364@.TK2MSFTNGP11.phx.gbl...
> Thanks... but, I'd like to do it inside my .aspx file...
> Isn't it possible?
> tanks
> Marcos
> "Sharon" <talsharon@.hotmail.com> escreveu na mensagem
> news:OvBFDJmIEHA.3128@.TK2MSFTNGP10.phx.gbl...
> the
> its
> cannot
>
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSettings["SrcImgSired">
>
use the binding syntax <%# bindingexpression %>
-- bruce (sqlwork.com)
"Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
news:ulbiAAmIEHA.3240@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I've put a appSetting tag into my web.config, but when I try to catch its
> value to my Image WebControl occurs the follow error: "Server tags cannot
> contain <% ... %> constructs."
> on myPage.aspx (Notice the ImageUrl tag):
> <asp:Image id="Image1" runat="server"
>
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSettings["SrcImgSired">
> stema"]%> />
> So, What's wrong with my ImageUrl attribution?
> Is there any way to do that?
> thanks a lot
> Marcos
>
In your code there are some errors :
The <%= construct can only be used in client script for write some value
from server (like old ASP).
your Image is server side not in client side!!!!
You can use the <%# construct. This is for binding value!
<asp:Image id="Image1" runat="server"
ImageUrl='<%#System.Configuration.ConfigurationSettings.AppSettings["Src
ImgS
istema"]%>' />
this code require a DataBind() method call!!!
Brun
"Marcos MOS" <marcos.santos@.softway.com.br> wrote in message
news:ulbiAAmIEHA.3240@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I've put a appSetting tag into my web.config, but when I try to catch its
> value to my Image WebControl occurs the follow error: "Server tags cannot
> contain <% ... %> constructs."
> on myPage.aspx (Notice the ImageUrl tag):
> <asp:Image id="Image1" runat="server"
>
ImageUrl=<%=System.Configuration.ConfigurationSettings.AppSettings["SrcImgSired">
> stema"]%> />
> So, What's wrong with my ImageUrl attribution?
> Is there any way to do that?
> thanks a lot
> Marcos
>

Thursday, March 22, 2012

Server.HtmlDecode Question

I'm trying to put an image tag inside of an anchor tag that I plan to
dynamically add to a place holder tag.
The trouble is, though, that the "<" character is showing as "<" and the
">" as ">". Is there a way to get these show correctly on the html page?
Thanks in advance!
C# Code
System.Web.UI.HtmlControls.HtmlAnchor hMenuHome = new HtmlAnchor();
hMenuHome.ID = "hMenuHome";
hMenuHome.HRef = "default.aspx";
hMenuHome.InnerText = Server.HtmlDecode("<") + "img name=\"n_home\"
src=\"images/n_home.gif\" width=\"202\" height=\"50\" border=\"0\"
id=\"n_home\" alt=\"Home\" /" + Server.HtmlDecode(">");
hMenuHome.Attributes["onMouseOut"] = "MM_swapImgRestore();";
hMenuHome.Attributes["onMouseOver"] =
"MM_swapImage('n_home','','images/n_home_f2.gif',1);";
phMenuHome.Controls.Add (hMenuHome);
Resulting Html Code
<a href="http://links.10026.com/?link=default.aspx" id="hMenuHome" onMouseOut="MM_swapImgRestore();"
onMouseOver="MM_swapImage('n_home','','images/n_home_f2.gif',1);"><img
name="n_home" src="http://pics.10026.com/?src=/library/images/n_home.gif"
width="202" height="50" border="0"
id="n_home" alt="Home" /></a>"Night Air" <nospamplease@.yahoo.com> wrote in message
news:4vRfj.3024$pr6.195@.nlpi070.nbdc.sbc.com...
> I'm trying to put an image tag inside of an anchor tag that I plan to
> dynamically add to a place holder tag.
> The trouble is, though, that the "<" character is showing as "<" and
> the ">" as ">". Is there a way to get these show correctly on the html
> page?
> Thanks in advance!
>
Nevermind -- I found the problem.
I was using InnerText instead of InnerHtml.
Problem solved.
Thanks anyway!
On 6 jan, 01:19, "Night Air" <nospample...@.yahoo.com> wrote:
> "Night Air" <nospample...@.yahoo.com> wrote in message
> news:4vRfj.3024$pr6.195@.nlpi070.nbdc.sbc.com...
>
>
>
> Nevermind -- I found the problem.
> I was using InnerText instead of InnerHtml.
> Problem solved.
> Thanks anyway!
Yes, and for information Server.HtmlDecode("<") will not produce
anything good.
For html decoding you have to put HTML in it. And "<" by its own is
not HTML