A
Adrian
Hi All,
I am a big fan of the Codebehind model. I would like to continue to
keep my .ASPX pages FREE of any 'LOGIC' and keep it PURE 'HTML'. I
would like to know how many of you handle the following situation.
(In pseudo code to illustrate my point)
<html>
<body>
if (condition)
{
DoThis();
<asp:Label/>
...
... More HTML code
}
else
{
...Html Code...
DoThat();
DoSomethingElse();
...Html Code..
}
</body>
<html>
Of course the logic is all contained in a Codebehind file using C#. I
would like to elimate this type of design if possible and keep the
..ASPX pure from any such logic.
Does anyone have an Elegant solution to this problem? how can I keep
such conditional statements from appearing in my ASPX ?
I am a big fan of the Codebehind model. I would like to continue to
keep my .ASPX pages FREE of any 'LOGIC' and keep it PURE 'HTML'. I
would like to know how many of you handle the following situation.
(In pseudo code to illustrate my point)
<html>
<body>
if (condition)
{
DoThis();
<asp:Label/>
...
... More HTML code
}
else
{
...Html Code...
DoThat();
DoSomethingElse();
...Html Code..
}
</body>
<html>
Of course the logic is all contained in a Codebehind file using C#. I
would like to elimate this type of design if possible and keep the
..ASPX pure from any such logic.
Does anyone have an Elegant solution to this problem? how can I keep
such conditional statements from appearing in my ASPX ?