|
|
 |
BOOK: Professional ASP.NET 2.0 AJAX ISBN: 978-0-470-10962-5  | This is the forum to discuss the Wrox book Professional ASP.NET 2.0 AJAX by Matt Gibbs, Dan Wahlin; ISBN: 9780470109625 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Professional ASP.NET 2.0 AJAX ISBN: 978-0-470-10962-5 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

September 3rd, 2007, 04:23 AM
|
|
Registered User
|
|
Join Date: Jul 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
First code sample does not work
The code same called "BasicUpdatePanel.aspx" does nothing when I load it into my local web server. I am running IIS5 locally. I click the buttons and .... zip!
Nothing happens. No postback no nothing. Any suggestions please?
Many thanks
Tomo
|

September 3rd, 2007, 04:53 AM
|
|
Registered User
|
|
Join Date: Jul 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hmm it seems I may have bought the wrong book. I am a total noob at ajax.
However, code samples given in the professional book should give you complete code to run the sample.
I would still like to be able to run the first code sample. It looks like this:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server" language="C#" >
protected override void OnLoad(EventArgs e) {
base.OnLoad(e);
string theTime = DateTime.Now.ToString();
for (int i = 0; i < 3; i++) {
theTime += "<br />" + theTime;
}
time1.Text = theTime;
time2.Text = theTime;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Basic Update Panel</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:Label runat="server" ID="time1"></asp:Label><br /><br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div style="border-style:solid;background-color:gray;">
<asp:Label runat="server" ID="time2"></asp:Label><br />
<asp:Button ID="Button1" runat="server" Text="Inside Button" />
</div><br />
</ContentTemplate>
</asp:UpdatePanel>
<asp:Button ID="Button2" runat="server" Text="Outside Button" />
</div>
</form>
</body>
</html>
The first thing I noticed was there were no button click events.
Many thanks
Tomo
|

September 30th, 2007, 12:56 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You said IIS5, but I think you meant IIS6? The code works for me. Did you install the ASP.NET Extensions correctly?
What happend if you build the project - any errors?
Eric
|

October 5th, 2007, 06:22 PM
|
|
Authorized User
|
|
Join Date: Apr 2007
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I just went through the same thing. Look in the code behind. I had to add my own code to get it to work:
Code:
protected void Button2_Click( object sender, EventArgs e )
{
time1.Text = DateTime.Now.ToString();
}
protected void Button1_Click( object sender, EventArgs e )
{
time2.Text = DateTime.Now.ToString();
}
|

December 7th, 2008, 03:22 AM
|
|
Registered User
|
|
Join Date: Dec 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks working fine for me too.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |