Home > DeveloperSection > Blogs > Server Side Environment in ASP.NET

Server Side Environment in ASP.NET


.NET ASP.Net 
Ratings:
0 Comment(s)
 692  View(s)
Rate this:

Server Side Environment in ASP.NET

In this blog, I’m explaining about server side environment in .Net

 

The server side environment that runs a scripting language is a web server. A user’s request is fulfilled by running a script directly on the web server to generate dynamic HTML pages. This HTML is then sent to the client browser. It is usually used to provide interactive web sites that interface to databases or other data stores on the server.

A server-side script is a series of instructions used to sequentially issue commands to the Web server. These scripts are differentiated from text and HTML by delimiters. A delimiter is a character or sequence of characters that marks the beginning or end of a unit. ASP.NET  uses the delimiters <% and %> to enclose script commands. Within the delimiters, you can include any command that is valid for the scripting language you are using.

Using code

<%@ %>:  Text template Directive

<%= %> and <% %> Embedded code Blocks

<:>: HTML Encoding Output

<#>:Data binding Expression

<$>:Expression

<%--   --%>:Server side Comments

@:Razor code instruction

@*  *@:Comment in Razor

Example

Data binding Expression

<%# Bind("id") %>

Embedded Code Blocks  

<%

var role = Session["RoleName"] != null ? Session["RoleName"].ToString() : "";

%>  


Don't want to miss updates? Please click the below button!

Follow MindStick