<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d8211560\x26blogName\x3dTech+Tips,+Tricks+%26+Trivia\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://mvark.blogspot.com/search\x26blogLocale\x3den\x26v\x3d2\x26homepageUrl\x3dhttp://mvark.blogspot.com/\x26vt\x3d-5147029996388199615', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Tech Tips, Tricks & Trivia

by 'Anil' Radhakrishna
An architect's notes, experiments, discoveries and annotated bookmarks.

Search from over a hundred HOW TO articles, Tips and Tricks


ASP.NET Server tags

I feel participating in technical forums is a good way to quiz one’s knowledge. I ran into a nice posting about ASP.NET server tags on ASP.NET Forums recently. Here is a quick reference of all the ASP.NET server tags with relevant links to MSDN:

  • <% %> - Represents an embedded code block that executes during the page's render phase. The code in the block can execute programming statements and call functions in the current page class.
  • <%= %> - Short cut for Response.Write statement.
  • <%# %> - Used with data-binding expressions
  • <%$ %> - The dollar sign ($) indicates to ASP.NET that an expression follows. The expression prefix (<%$ expressionPrefix: expressionValue %> ) defines the type of expression, such as AppSettings, ConnectionStrings, or Resources. Following the colon (:) is the actual expression value that ASP.NET will resolve.
  • <%-- --%> - Used for Server-Side Comments.
  • <%@ %> - Represents a directive block.

The ASP.NET page framework supports the following directives:

  1. @ Page
  2. @ Control
  3. @ Import
  4. @ Implements
  5. @ Register
  6. @ Assembly
  7. @ Master
  8. @ WebHandler
  9. @ PreviousPageType
  10. @ MasterType
  11. @ OutputCache
  12. @ Reference

Related reading:
ServerTagsRegex Class - Provides a regular expression to parse ASP.NET server tags.

Labels: ,

Tweet this | Google+ it | Share on FB

« Home | Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »

»

Post a Comment