Author: jbettineski | Posted on: 9/16/2008 8:36:38 AM | Views : 325

So, I've got an aspx page and what I want to do is have one of the Content areas populated with imported html from an external file.
There's just a couple problems I'm having:
 1: I'd prefer to do inline code, but I'm finding that you can't do inline C#. Is this correct?
 2: How do I update the Content area from my function? What element should be in there for me to update it?
 Here's my function: 

public static string ReadTextFromFile()
{
StreamReader re = File.OpenText(Server.MapPath("wspp.html"));
StringBuilder sb = new StringBuilder();

string input = null;
while ((input = re.ReadLine()) != null)
{
sb.Append(input);
}
re.close;

Go to the complete details ...