Passing parameters from a web page to an activex

Passing parameters from a web page to an activex

Post by Roni.Brow » Fri, 25 Jan 2008 19:44:02


Hi Everybody!

I have a web page written in asp.net that includes an activex control.
In order to pass parameters to the activex I use the <param> tag.
It is being read in the activex with the IPrpertyBag Read function.
One of the values in the param tag includes apostrophe (')

When read in the activex it is being truncated


<OBJECT ID="MYACTIVEX" ......

<PARAM NAME="ClassName" VALUE="Ken's Stroies">


......
</OBJECT>


CActiveXContain::Load(IPropertyBag * pPropBag, IErrorLog * pErrorLog)
{

........

::VariantClear(&varValue);

pPropBag->Read(L"CourseName",&varValue,0);

........
}

varValue is equal to "Ken"

Do you have any advice how to make the variable read the whole value
(Ken's stories)?

Thanks for any advice
 
 
 

Passing parameters from a web page to an activex

Post by Max » Mon, 28 Jan 2008 22:32:33

Try to replace ' with '.