471,349 Members | 2,007 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

Inline code in .Net

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

Jul 22 '05 #1
1 2447
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!
***************************
"CodeRazor" wrote:
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

Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by boe | last post: by
14 posts views Thread by Chris Mantoulidis | last post: by
21 posts views Thread by Rubén Campos | last post: by
4 posts views Thread by Tony Johansson | last post: by
18 posts views Thread by Method Man | last post: by
6 posts views Thread by Anders M | last post: by
7 posts views Thread by Wu Shaohua | last post: by
9 posts views Thread by chinu | last post: by
14 posts views Thread by jg | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.