Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 3rd, 2007, 03:23 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
  #2 (permalink)  
Old September 3rd, 2007, 03:53 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #3 (permalink)  
Old September 29th, 2007, 11:56 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Reply With Quote
  #4 (permalink)  
Old October 5th, 2007, 05:22 PM
Authorized User
 
Join Date: Apr 2007
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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();
     }
Reply With Quote
  #5 (permalink)  
Old December 7th, 2008, 02:22 AM
Registered User
 
Join Date: Dec 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks working fine for me too.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
want sample code mohiddin52 Access VBA 2 December 16th, 2006 03:54 AM
Need Sample code okshilato SQL Server 2005 0 March 28th, 2006 09:41 AM
Sample Code mirouvor Java Databases 1 January 2nd, 2006 01:28 PM
Can't make sample project work sillygiu@hotmail.com All Other Wrox Books 1 August 17th, 2004 03:02 AM
Where the sample code? rbtcx BOOK: Professional C#, 2nd and 3rd Editions 5 August 21st, 2003 02:58 AM



All times are GMT -4. The time now is 07:41 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.