Software: Visual Web Developer 2008 Express Edition
Book: Programming ASP.NET 3.5 by O'Reilly
The book says create source code in .aspx file
<head runat="server">
<title></title>
</head>
<script type="text" language="javascript">
function ButtonTest(){
alert("Button clicked - client side processing");
}
function DoChange(){
document.getElementById("btnSave").disabled=false;
}
</script>
<body>
<h1>Client-Side Processing</h1>
<form id="form1" runat="server">
<div>
<input id="btnHTML" runat="server" onclick="javascript:ButtonTest();"
onserverclick="btnHTML_ServerClick" type="button" value="HTML Button" />
Design view looks like this
Book says to double-click button in Design view to create event handler in the code behind file and to add the following highlighted line of code
protected void btnHTML_ServerClick(object sender, EventArgs e){
txtHTML.Value = "An HTML server control";
}
But when I double-click the HTML button, it takes me back to the .aspx file and there is no function btnHTML_ServerClick to add txtHTML.Value = "An HTML server control";
How to fix?