본문 바로가기

Microsoft/C# & ASP.NET

ASP.NET 특수태그(special tag) 설명

원문 http://forums.asp.net/t/1139381.aspx?what+are+these+special+tags+and+

those tags can be hard to search for since the are generally discarded by search engines as noise...

here are some helpful links for you on the various tags.

<% %>  An embedded code block is server code that executes during the page's render phase. The code in the block can execute programming statements and call functions in the current page classhttp://msdn2.microsoft.com/en-gb/library/ms178135(vs.80).aspx

- 대충 렌더링 단계의 서버 코드를 실행 하도록 처리된다는 거 같음(해당 블록).

<%= %> most useful for displaying single pieces of informationhttp://msdn2.microsoft.com/en-us/library/6dwsdcf5(VS.71).aspx

 - 쪼매매한 정보를 뭐 디스플레이 시킬때 유용 하단디 ?

<%# %> Data Binding Expression Syntaxhttp://msdn2.microsoft.com/en-us/library/bda9bbfx.aspx

- 데이터 바인딩 할때 구문

<%$ %> ASP.NET Expressionhttp://msdn2.microsoft.com/en-us/library/d5bd1tad.aspx

- 요건 닷넷 런타임에서 쓰이는 검. 대충 리터럴을 리턴 하던데 먼지는 잘 모르겠음.

<%@ %> Directive Syntaxhttp://msdn2.microsoft.com/en-us/library/xz702w3e(VS.80).aspx

- 요건 참조 구문

<%-- --%> Server-Side Commentshttp://msdn2.microsoft.com/en-US/library/4acf8afk.aspx

-요건 서버주석

<%: %> Like <%= %> But HtmlEncodes the output (new with Asp.Net 4). http://weblogs.asp.net/scottgu/archive/2010/04/06/new-lt-gt-syntax-for-html-encoding-output-in-asp-net-4-and-asp-net-mvc-2.aspx

- 요건 .net 4에서 %= 가 %: 와 쉠쉠임.