Frameset

  • Thread starter Thread starter Guest
  • Start date Start date
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;
 
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)
 
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)
 
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)
 
Back
Top