A
Adie
I'm actually trying render usercontrols dynamicaly fraom a name stored
in a db, but am have problems. My debugging attempts involve trying to
write the contents of the .aspx to a label, but this is just giving me
the text and actually rendering the html, I just want the raw code.
void someMethod()
{
string ucstring = "";
blah.GenericData gd = new GenericData(); // my own data class
SqlDataReader dr;
dr = gd.getByString
(@"select Category_Spec
from Categories
where Category_Name = 'End Caps'");
while(dr.Read())
{
ucstring = dr.GetSqlValue(0).ToString();
}
StreamReader sr = new StreamReader
(@"C:\Inetpub\wwwroot\blah\pecs\" + ucstring);
s = sr.ReadToEnd();
Literal1.Text = s; // should render HTML tags as well??
}
Anyone have the answer to this one?
in a db, but am have problems. My debugging attempts involve trying to
write the contents of the .aspx to a label, but this is just giving me
the text and actually rendering the html, I just want the raw code.
void someMethod()
{
string ucstring = "";
blah.GenericData gd = new GenericData(); // my own data class
SqlDataReader dr;
dr = gd.getByString
(@"select Category_Spec
from Categories
where Category_Name = 'End Caps'");
while(dr.Read())
{
ucstring = dr.GetSqlValue(0).ToString();
}
StreamReader sr = new StreamReader
(@"C:\Inetpub\wwwroot\blah\pecs\" + ucstring);
s = sr.ReadToEnd();
Literal1.Text = s; // should render HTML tags as well??
}
Anyone have the answer to this one?