Hi
Just wondering what people's opinions are on using inline declarative output rather using code behind. Let me explain. I have a colleague who prefers to write a lot of his output in the aspx page. I.e.
<asp:Image ID="imgLogo" ImageUrl="<%# ThePage.LogoURL %>" Visible="<%# String.IsNullOrEmpty(ThePage.LogoURL) %>" runat="server" />
<h3><%# ThePage.lblValue %></h3>
<p><%# ThePage.Address1 %></p>
<p><%= ThePage.Address2 %></p>
<p><%# ThePage.Address3 %></p>
<p><%# ThePage.Address4 %></p>
And then in the code behind, in the page_load event he'd have "this.DataBind();" to populate the content. Whereas I'd prefer to have the values assigned to labels and literals from the code behind. His argument is that using the declarative approach is less code in the code behind. This is true, but in my o ...
Go to the complete details ...