CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_web_developer_2005_express Tags:
Item Type: NewsGroup Date Entered: 11/23/2006 1:52:30 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 14 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
carlbeech
Asp.Net User
Newbee question about debugging....11/23/2006 1:52:30 PM

0/0

Hi,

I've installed Visual Web Developer 2005 Express, and I've created a web site and done various things. I'm trying to get a little more in depth, so I thought I'd do the old trick with access, where you set a break point and look at the values in the objects.

I've created a treeview control, and set a breakpoint on the 'load' event. Using c#, the two parameters are sender (object) and e (EventArgs). Looking in the 'locals' view, I can see the 'sender' variable, and it contains a number of elements, e.g. CollapseImageUrl, ExpandDepth etc.

In the immediate window, if I type:

?sender.ExpandDepth

I get the error message "'object' does not contain a definition for 'ExpandDepth'"

Can someone tell me where I'm being stupid? - I can see 'sender' with the attribute 'ExpandDepth' has the value of '0' in the locals window, so how come I can't get at it in the immediate window?

 

Many thanks in advance

 

Carl.
 

vivek_iit
Asp.Net User
Re: Newbee question about debugging....11/23/2006 8:08:54 PM

0/0

Hi,

This is because the type of sender is System.Object, and Object type does not has any member by the name of ExpandDepth. You need to cast the sender to the appropriate object in order to use its properties, for example:

((Page)sender).ID

Hope this helps,

Vivek


MVP, ASP.NET || My Website || Blog || Articles

Please mark the most helpful reply/replies as "Answer".
carlbeech
Asp.Net User
Re: Newbee question about debugging....11/24/2006 9:07:23 AM

0/0

Many thanks,

I'll give that a try - but it still puzzles me - you don't need to cast the object within the actual code, so how come you need to cast it in the immediate window? - or should the object be cast'ed within the code too (if so, then a number of examples on the web should need updating!)

 
Maybe I'm being too pedantry...

 

Carl.
 

vivek_iit
Asp.Net User
Re: Newbee question about debugging....11/24/2006 12:18:56 PM

0/0

Carl,

Immediate windows runs the evaluation expression independently. It is like a sort of mini execution screen. Even in the watch window if you try to execute sender.SomeProperty, it will give you an error, and you DO need to cast the object in the code. Its simple, unless you cast it you won't be able to access the actual type related properties at runtime.

The lcoals view already "knows" about the object and it simply shows the properties via reflection (I think so). But in code or Immediate window, you need cast it accordingly.

 HTH

Vivek


MVP, ASP.NET || My Website || Blog || Articles

Please mark the most helpful reply/replies as "Answer".
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
'Re: Newbee Question on ' - MARC [next in thread] List: ant-user Subject: Re: Newbee Question on [javac] -nowarn Generate no warnings ...
Re: Newbee Question on -g:{lines,vars,source} Generate only some debugging info ... e-mail: [EMAIL PROTECTED]. Re: Newbee Question on Jacob Kjome. Reply via email to.
Newbee: Query Analyzer Debugger not working Newbee: Query Analyzer Debugger not working, Expand / Collapse .... SQL Server Security Skills, |-- Question of the Day (QOD) ...
windowsce platbuilder Newbee question for Platform Builder My newbee questions are: 1. What PB should I download? ... provide that to you, even only for debugging pourpouses (I suppose they can't). ...
Mailing list archives Subject, Re: Newbee Question on ... -g Generate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source} ...
[BusyBox] Init Problem - Newbee Question [BusyBox] Init Problem - Newbee Question. Berlin Brown bigbinc at hotmail.com Thu Feb 13 19:31:03 MST 2003. Previous message: [BusyBox] Busybox/init ...
Re: Re: newbee question: msg#00016 ... but the info in the demo say 0.5.9 > > I started forms with debug-level 2 and have found ... Previous by Thread: Re: newbee question, Andreas Moroder ...
Exception handling in Enterprise Library 2.0 newbee question Exception handling in Enterprise Library 2.0 newbee question ... MTest\bin\Debug \MTest.vshost.exe.config line 161)" ...
programmer, emulator & debugger difference newbee - Electronic ... Hai Shall any one explain the difference between programmer, emulator and debuger in detail and basic funtions of each Thanks in advance ...
Apple - Support - Discussions - xcode newbee question ... Re: xcode newbee question Posted: Apr 8, 2008 7:33 AM in response to: swingo ... The Debug build configuration cannot build universal binaries. ...

Videos:
C++ Tutorial (3) - Absolute n00b spoonfeed Video tutorials about programming in the C++ programming language. Forum: http://cpptutorials.freeforums.org/ Part 3: * Different compilers / same ...
Second Life: Pye's #1 Tip (Part 2) Camera Vs Avatar Motion Enabling the "debug" menus: Client, Server by pressing: Ctrl + Alt + D keys. Then selecting "disable camera constraints" f...




Search This Site:










account login procedures & verification code

how to get a file type name from the uploading file?

boss wants security "checkpoint"

please help me with handling events

let's get dnn to #1

if/then conditions and databinding.

error loading module

sitemapdatasource and treeview

what do i put in the code to specify a folder to upload

changing the default date of popupcalendar.js

who includes who?

detemining a default textbox for a page

membership.getallusers(); server error

web application project - non updatable compile?

item command on a textbox

imagemap coordinates

dnn 3.x module layout question

asp with dreamweaver

wokring with array lists

is javascript important

separating my vb classes into different files

links broken after deployment

applying skins on a dropdownlist

need to insert a xml message into a jms queue using vb.net

sql session state performance

undeclared controls after upgrade to 2.0

how do i display todays date in text

asp application

adrotator control

windows hosting seminar series and uk windows-based hosting workshops

 
All Times Are GMT