p2p.wrox.com 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 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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 3rd, 2007, 04:23 AM
Registered User
Points: 17, Level: 1
Points: 17, Level: 1 Points: 17, Level: 1 Points: 17, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old September 3rd, 2007, 04:53 AM
Registered User
Points: 17, Level: 1
Points: 17, Level: 1 Points: 17, Level: 1 Points: 17, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old September 30th, 2007, 12:56 AM
Friend of Wrox
Points: 1,883, Level: 17
Points: 1,883, Level: 17 Points: 1,883, Level: 17 Points: 1,883, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old October 5th, 2007, 06: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();
     }
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old December 7th, 2008, 03:22 AM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks working fine for me too.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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



All times are GMT -4. The time now is 06:27 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc