2 Replies - 4903 Views - Last Post: 13 July 2012 - 01:01 AM Rate Topic: -----

#1 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

Problem in asp.net tags

Posted 12 July 2012 - 11:26 PM

HI all,

I am new to asp.net and I found many tags in asp.net. Can you explain what is the differences among these tags.

1. <%

2. <%=

3. <%:


thanks in advance.
Is This A Good Question/Topic? 0
  • +

Replies To: Problem in asp.net tags

#2 strawhat89  Icon User is offline

  • The Watcher Outside Your Window


Reputation: 247
  • View blog
  • Posts: 1,795
  • Joined: 11-July 11

Re: Problem in asp.net tags

Posted 13 July 2012 - 12:38 AM

Those are called as server-side scripting delimiters.

<%@ %> is used for page level directives. (<%@ Page Language="C#" %>)
<% %> is for inclusion of server-side code (<% a = a/2; %>)
<%: %> is used to output an HTML encoded string.
<%= %> is an equivalent of Response.Write();
<%# %> is used for databinding in ASP.NET Controls.
<%$ %> is used for expression binding, usually with localized string resources.
<%-- --%> is used for server side comments.



You can find more information on msdn. Check this for the links.
Was This Post Helpful? 1
  • +
  • -

#3 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

Re: Problem in asp.net tags

Posted 13 July 2012 - 01:01 AM

hi strawhat89,

thanks . thank u very much..
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1