Passing variable from code behind to HTML tag in ASP.NET

Some how in some case, we want to directly passing variable that we already declare in ASP.NET with code behind to the HTML tag, like <input type = “TEXT”> tag in HTML, we can do that just with the simple code, here is the way:

Declare test as a property (at the class level) instead of a local variable, then refer to it as you currently do in your markup (aspx).

VB.NET 10 (automatic properties):

Protected Property test As String = "Test" 


Pre-VB.NET 10 (no support for automatic properties)

Private _test As String
Protected Property Test As String
     Return _test
End Get
Set(value As String)
     _test = value
End Set
End Property


place that variable in HTML tag that you want to place, such as :

<input type=”TEXT” name=”SomeThing” size=”50″ maxlength=”250″ value = “<%= test %>”>


that’s all, hope this helpful

Enable content expiration under IIS 7

In IIS6, it was with the website properties –> HTTP Headers. Here in IIS7, you can do this on the “HTTP Response Headers” feature on the website.

  • Select the website in the Connections pane.
  • Double click on the “HTTP Response Headers” feature in the features pane
  • In the action pane, click on the “Set Common Headers…”


  • You will see the following popup


Now, you know what to select. You should enable the HTTP Keep-Alive on this popup only.


Source :

Run CGI program under IIS 7.0

Looking around I didn’t find a good documentation on how to get good old CGI’s running on IIS 7 or 7.5. Here is a quick walkthrough:

1. Let’s write a quick CGI:
Take the following code and save it as simplecgi.cs in the directory c:\inetpub\wwwroot\cgi

using System;
using System.Collections;

class SimpleCGI
    static void Main(string[] args)
        Console.WriteLine("<h1>Environment Variables</h1>");
        foreach (DictionaryEntry var in Environment.GetEnvironmentVariables())
            Console.WriteLine("<hr><b>{0}</b>: {1}", var.Key, var.Value);

2. Change into the C:\inetpub\wwwroot\cgi directory and compile the source by using the following command-line:

%windir%\Microsoft.NET\Framework\v2.0.50727\csc.exe SimpleCGI.cs

Read more of this post

Web design layout tutorial

Create a new document 800×800 with a black background, select the color #01afee and create a rectangle. Once you have your rectangle press “CTRL + T”, now rotate your rectangle like this.

Now for this part you need some “splatter brushes” EITHER search yahoo or goto a site like brusheasy and download a set, once you have them make some randam splatters over your canvas, using the colors blue and black.

Select the type tool and add your site title and slogan.

Now if you have used two colors like mine above for your title then select one of the colors and add a splatter. If you have used white then you can just use a white splatter, you should have something like this.

Select the type tool again and add your navigation, use free transform (CTRL + T) to rotate the text. Read more of this post

Making your own portfolio web page

Need personal web page? In this tutorial we will learn to create nice personal portfolio web page.

Start working by creating a new file (File>New), having 770×750 px and 72 dpi. We shall use on this new made file the Rectangle Tool (U) to represent the background of the site’s page to be.

Making your own portfolio web page in Photoshop CS3

Set the next parameters for this layer by making a mouse click on the layer we work with on the layers’ panel: Blending Options>Gradient Overlay

Making your own portfolio web page in Photoshop CS3

Gradient’s parameters:

Making your own portfolio web page in Photoshop CS3

Making your own portfolio web page in Photoshop CS3

Choose again the Rectangle Tool (U) to represent that place reserved for the author’s portrait and the lateral menu. Firstly we have to represent the common primary layer and then press Alt button to divide the zones, applying the same tool, used before. Read more of this post

Urban layout web design

Hello friends

The Talk-Mania Team wants to thank you for a great 2007, and we’re looking forward to an even better 2008. We plan to add more tutorials than last year, and to create a few new websites for you.

From now on almost each tutorial will have a sponsor. If you want to support our website try to visit each sponsor to see their offers. I promise i will choose the best products and sponsors for you.

Today’s sponsor is a great website which i personally use, and now i really like to promote it because i think it is very cool piece of software for a webmaster. ( it is FREE )
If you want to store your files online, create a photo album, Store & backup your important files online, Share & publish your documents and photos online than you should register right now and you will receive2 GB of free Storage
Sign up for a FREE account

Today i will create Tutorial Number 142 from 500 Tutorial Marathon
I will show you how to create a Urban layout. You can use this type of layout if you plane to start a web design company

Please make a new document. size should be 760×770 Pixels. Use a White background for this document

Open this image in Photoshop. Read more of this post

Design a cool photography portfolio

Create a new file (File>New) that would have 800×800 px and 72 dpi. Selecting the Paint Bucket Tool (G) may help us to paint the new file with the next color #111111

Create Photo Portfolio Web Layout in Photoshop CS3

Next we have to use the Rounded Rectangle Tool (U) (radius 7 px) to represent the primary layer reserved for the menu’s button, situated on the site’s header.

Create Photo Portfolio Web Layout in Photoshop CS3

The layer’s parameters are selected by making a mouse click on the necessary layer on the layers’ panel.
Blending Options>Gradient Overlay

Create Photo Portfolio Web Layout in Photoshop CS3

Gradient’s parameters:

Create Photo Portfolio Web Layout in Photoshop CS3 Read more of this post