HTML Control: span inner text (C#) : Span « HTML Control « ASP.Net






HTML Control: span inner text (C#)

<%@ Page Language="C#" %>

<html>
<script runat=server>
protected void OnClickMyButton(object src, EventArgs e)
{
  _message.InnerText = "You clicked the button!";  
}

protected void Page_Init(object src, EventArgs e)
{
  _MyButton.ServerClick += 
                        new EventHandler(OnClickMyButton);
}
</script>
<body>
  <form runat=server>

    <h2>ASP.NET event page</h2>
    <p>
    <input type=button id=_MyButton 
           value="Click me!" runat=server />
    </p>
    <span id=_message runat=server/>
  </form>
</body>
</html>

           
       








Related examples in the same category

1.Span Control: set bold font (VB.net)
2.Get value from HTML Input (VB.net)