I built the sample web app for chapter 18 and html side does not give any errors, but does not work either. See page 624 for start of ASP.NET Try it out.
Note, I started out using
VB 2003 .NET and when I found too many things missing to do the course, picked up Visual Studio 2010 Ultimate and am working with that. Some items have changed in selection and may be the issue.
I am including two copies. The first is from building a blank web page ("ASP.NET Empty Web Application") after the default web page did not work properly. The second is using "ASP.NET Web Application"
The blank seemed to more closely match your syntax.
thanks
Keith
Build from blank web page
================================================== =====
<%@ Page Language="
vb" AutoEventWireup="false" CodeBehind="Default.aspx.
vb" Inherits="Client_Server_Processing2._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>"My Web Page"</title>
<script language="javascript" type="text/javascript">
// <![CDATA[
function btnClient_onclick() {
document.getElementById("lblServer").innerHTML = "Server";
document.getElementById("lblClient").innerHTML = "Changed";
}
// ]]>
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="btnServer" runat="server" Text="Server" />
<asp:Literal ID="lblServer" runat="server" Text="Server"></asp:Literal>
</div>
<p>
<input id="btnClient" type="button" value="Client" onclick="return btnClient_onclick()" /><asp:Label ID="lblClient"
runat="server" Text="Client"></asp:Label>
</p>
</form>
</body>
</html>
================================================== ====
Build from default web page
================================================== ====
<%@ Page Title="My Web Page" Language="
vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
CodeBehind="Default.aspx.
vb" Inherits="Client_Server_Processing._Default" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<p>
<script language="javascript" type="text/javascript">
// <![CDATA[
function btnClient_onclick() {
document.getElementById("lblClient").innnerHTML = "Changed";
document.getElementById("lblServer").innnerHTML = "Server";
}
// ]]>
</script>
<br />
<asp:Button ID="btnServer" runat="server" Text="Server" />
<asp:Label ID="lblServer" runat="server" Text="Server"></asp:Label>
</p>
<p>
<input id="btnClient" type="button" value="Client" onclick="return btnClient_onclick()" /><asp:Label ID="lblClient"
runat="server" Text="Client"></asp:Label>
</p>
<p>
</p>
</asp:Content>