How can I display "hello world" in an .aspx file?
asp.net, c#
Solution
Try this:
public partial class _Default : System.Web.UI.Page
{
public string hello = "hello world";
protected void Page_Load(object sender, EventArgs e)
{
}
}
Problem
I have `Default.aspx` and a seperate code file: ``` public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { public string hello = "hello world" } } ``` I would like to display this in my Default page i have tried to use <%=hello%> but does not work. What am I doing wrong?