Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 18th, 2007, 01:17 PM
Registered User
 
Join Date: Apr 2007
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?

 
Old April 18th, 2007, 01:25 PM
Registered User
 
Join Date: Apr 2007
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?






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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.