<script  runat="server">
Sub submit(Source As Object, e As EventArgs)
      hidden1.Value=string1.Value
      p1.InnerHtml="Hidden value= " + hidden1.Value
End Sub
</script>


<!DOCTYPE html>
<html>
<body>

<form runat="server">
Enter some text: <input id="string1" type="text" size="25" runat="server" />
<input type="submit" value="Submit" OnServerClick="submit" runat="server" />
<input id="hidden1" type="hidden" runat="server" />
<p id="p1" runat="server" />
</form>

</body>
</html>