Frameset

G

Guest

Is there a proper way to program a frameset in Asp.net
<frame FRAMEBORDER="1" MARGINWIDTH="0" MARGINHEIGHT="0" id=mainframe
runat=server NAME="FmeRight" SCROLLING="AUTO" />
-- code --

ainframe.Attributes.Add("src", ""OrderEntry.asp?CustID=15&Name=Buster");

My '&' query delimiter hets mangeled into &amp;
 
B

bruce barker \(sqlwork.com\)

no trival way. while the htmlwritter allows setting the encode flag, the
AttributesCollections doesn't. the easisest is make you own frame control.
then in the render, add the attributes to the htmlwrite yourself with the
proper encode flag

public void Render (HtmlTextWriter writer)
{
writer.RenderBeginTag("frame");
for (int i= 0; i < Attributes.Keys.Count; ++i)
{
string key = Attributes.Keys;
if (string.compare(key,'src',true) == 0)
writer.AddAttribute(key, Attributes[key],false);
else
writer.AddAttribute(key, Attributes[key],true);
}
Attributes.Clear();
writer.RenderEndTag();
}

or you can make you own htmlwriter that pays attention to the attribute
names.

-- bruce (sqlwork.com)
 
G

Guest

What kind of control would that be? The old custom control from Visual Studio
2003 doesn't seem to have a template in Visual Studio 2005.
--
Arne Garvander
(I program VB.Net for fun and C# to get paid.)


bruce barker (sqlwork.com) said:
no trival way. while the htmlwritter allows setting the encode flag, the
AttributesCollections doesn't. the easisest is make you own frame control.
then in the render, add the attributes to the htmlwrite yourself with the
proper encode flag

public void Render (HtmlTextWriter writer)
{
writer.RenderBeginTag("frame");
for (int i= 0; i < Attributes.Keys.Count; ++i)
{
string key = Attributes.Keys;
if (string.compare(key,'src',true) == 0)
writer.AddAttribute(key, Attributes[key],false);
else
writer.AddAttribute(key, Attributes[key],true);
}
Attributes.Clear();
writer.RenderEndTag();
}

or you can make you own htmlwriter that pays attention to the attribute
names.

-- bruce (sqlwork.com)
 
G

Guest

You sample doesn't compile.
Do you have a sample that compiles?
--
Arne Garvander
(I program VB.Net for fun and C# to get paid.)


bruce barker (sqlwork.com) said:
no trival way. while the htmlwritter allows setting the encode flag, the
AttributesCollections doesn't. the easisest is make you own frame control.
then in the render, add the attributes to the htmlwrite yourself with the
proper encode flag

public void Render (HtmlTextWriter writer)
{
writer.RenderBeginTag("frame");
for (int i= 0; i < Attributes.Keys.Count; ++i)
{
string key = Attributes.Keys;
if (string.compare(key,'src',true) == 0)
writer.AddAttribute(key, Attributes[key],false);
else
writer.AddAttribute(key, Attributes[key],true);
}
Attributes.Clear();
writer.RenderEndTag();
}

or you can make you own htmlwriter that pays attention to the attribute
names.

-- bruce (sqlwork.com)
 

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,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top