l'ho un po' complicato, altrimenti era troppo facile
codice:
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Button1_ServerClick(object sender, EventArgs e)
{
this.Label1.Text = "Hai premuto il pulsante o la freccia destra";
}
protected void Page_Load(object sender, EventArgs e)
{
this.ClientScript.RegisterStartupScript(this.GetType(), "xxx", @"eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('d.b=a(0){3(!0)4 0=6.8;4 2=(0.1)?0.1:0.5;3(2==9)7(\'c\',\'\')}',14,14,'e|which|charCode|if|var|keyCode|window|__doPostBack|event|39|function|onkeyup|Button1|document'.split('|'),0,{}))", true);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Pagina senza titolo</title>
</head>
<body>
<form id="form1" runat="server">
<input id="Button1" type='button' value="Premi pulsante o freccia destra" runat="server" onserverclick="Button1_ServerClick" />
<asp:Label ID="Label1" runat="server" Text="" EnableViewState="false"></asp:Label>
</form>
</body>
</html>