Ok, I'm trying to learn ASP.NET, but the whole programming model isn't making sense to me.
You're suppsoed to be able to seperate design and code with the code-behind model, right?
I'm used to doing web development with perl, let me write a pseudocode example of what I'm familiar with:
print "<html><head></head><body>";
if ( user is logged in )
{
body();
}
else
{
print "Sorry, you're not logged in";
}
print "</body></html>";
function body()
{
print "You're logged in, here's a table: <br><table>";
for ( count = 0; count < 10; count++ )
{
print "<tr><td>This is line number", count, "</td></tr>";
}
print "</table>";
}
Ok, so that's pretty straightforward code I think. HOw do I do that while seperating a page into two files? What goes in the .aspx file, since essentially the entire page displaying is conditional based on the user being logged in.
Shouldn't I not be creating html code in my C# file? Am I expecting too much here, or will the asp.net application end up looknig a lot like the perl application?
Anyone have any insight? How would you seperate this into two files as a more experienced ASP.NET developer?
You're suppsoed to be able to seperate design and code with the code-behind model, right?
I'm used to doing web development with perl, let me write a pseudocode example of what I'm familiar with:
print "<html><head></head><body>";
if ( user is logged in )
{
body();
}
else
{
print "Sorry, you're not logged in";
}
print "</body></html>";
function body()
{
print "You're logged in, here's a table: <br><table>";
for ( count = 0; count < 10; count++ )
{
print "<tr><td>This is line number", count, "</td></tr>";
}
print "</table>";
}
Ok, so that's pretty straightforward code I think. HOw do I do that while seperating a page into two files? What goes in the .aspx file, since essentially the entire page displaying is conditional based on the user being logged in.
Shouldn't I not be creating html code in my C# file? Am I expecting too much here, or will the asp.net application end up looknig a lot like the perl application?
Anyone have any insight? How would you seperate this into two files as a more experienced ASP.NET developer?
