Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > BOOK: Beginning ASP.NET 2.0 and Databases
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 2.0 and Databases
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 and Databases by John Kauffman, Bradley Millington; ISBN: 9780471781349
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 and Databases 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 18th, 2007, 01:17 PM
Registered User
 
Join Date: Apr 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch 17 - Sender Object not working?

On page 434, the Sender object isn't working for me. You have to write a small event handler for the GridView1_PageIndexChanged event. It is supposed to contain the following:

Code:
PagesLabel.Text = "You are on page # " & (Sender.PageIndex + 1) & " of " & Sender.PageCount
But when I typed "Sender." no intellisense came up. I changed it to GrideView1.PageIndex and GridView1.PageCount and it works.

I can see the usefulness of using the Sender object, and I want to know why it isn't working.

Now I do have my code in a code-behind file instead of in <script> tags, would that be the reason?

  #2 (permalink)  
Old April 18th, 2007, 01:25 PM
Registered User
 
Join Date: Apr 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, the intellisense comes up, but it only lists 5 items like ToString, not the PageIndex or PageCount items. I rebuilt the page without the code-behind, putting the functions in the <script> tags and got the same result. Intellisense doesn't list the correct options. The functions do work, but I'm a little disappointed that the Intellisense doesn't work properly.

Am I doing something wrong?

 


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

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
error in ch 17 on running both fils no17 Beginning PHP 0 May 10th, 2008 02:15 AM
IStateManager.TrackViewState() Ch 17 EdKroket BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 0 January 25th, 2007 07:10 AM
"Sender As Object, E As EventArgs) anpham ASP.NET 1.0 and 1.1 Basics 3 July 7th, 2005 08:34 AM
sender as object... whyulil ASP.NET 1.0 and 1.1 Basics 3 August 22nd, 2004 11:50 AM



All times are GMT -4. The time now is 04:38 AM.


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