Accessing Server variable from your aspx[designer] page

If you want to access any server variable from you designer[*.aspx] page. Use Following steps to do so:

  • Create a variable with public nature on your code[*.cs] page
  • on designer page use <%= YourVariableName %> to show /print the same on page or use
    <% .....<< Your C# code here >>
    …..
    %>
  • Let me know your suggestions/queries on the same. Thanks.

  1. Hi, i have reading out and i will definitely bookmarrk your site, just wanted to say i liked this article.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>