Question: Asp.net c#
I am using the below code..

```
 <%String h = "hello";%>
                 <!-- "wall_com_insert.aspx?Tid=" + Application.Get("Tid");-->

      <div id="content_sr_comment" style="height: auto">&nbsp;<asp:Label ID="Label8" 
              runat="server" Text="<%=h%>" ></asp:Label>
        </div>  

```

But I am getting the output..

output displayed on the label: "<%=h%>"

I guess the syntax is not correct.. can I get help

Answer: 
You can't place a server command inside a server tag. Try this:

```
<div id="content_sr_comment" style="height: auto">&nbsp;<%= h %></div>

```

Or

```
<script runat="server" language="C#">
    void Page_Load(object sender, EventArgs e)
    {
        String h = "hello";
        Label8.Text = h;
    }
</script>

<div id="content_sr_comment" style="height: auto">&nbsp;
    <asp:Label ID="Label8" runat="server"></asp:Label>
</div>  

```
Another approach that I find useful, especially if you want to write out a value in multiple places in your html is to create a function in your code behind like this:

```
protected string SayHello()
{
    return "Hello";
}

```

You can then use it all over your html:

```
<div id="content_sr_comment" style="height: auto">
    <%=SayHello() %>
</div>  

```