Inline code in .Net

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I've working with a web app someone else has written. It contains inline code.
For example:

<html><body topmargin="0">
<%If Session("mySession") = "bla" Then%>
// html code in here
<%End if%>
</body></html>

My question is, in .Net, when is appropriate to use inline code? From what
I understand, traditional asp is inline code and .net changed this. (I have
no traditional asp experience) Where are the advantages, disadvantages of
inline code in .Net? Is it ever recommended / frowned upon?

Many thanks, I'll be interested to hear your comments.

CR
 
Whether you "inline" code or not, it will be run on the server. This is less
dangerous than it is in ASP, but still not the best way to do things. It is
better to have a control and bind to it from code behind than attempt to
extend the ASP methodologies into the .NET world.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Back
Top