Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 1st, 2009, 04:45 PM
Authorized User
 
Join Date: Mar 2009
Posts: 64
Thanks: 0
Thanked 1 Time in 1 Post
Default javascript and Intellisense

This is a question of curiosity.

On p. 304 where the JavaScript is being added, Intellisense seems to be kind of schizophrenic in that it shows some items, but not others. Also, the automatic formatting is missing, even when "Format Document" is invoked. Is this just a matter of Microsoft not including capabilities or is there something more fundamental going on?

I am clearly getting spoiled by having all the help from Visual Studio and miss it immediately when it is not there!

Thomas
 
Old April 1st, 2009, 05:49 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Are you using the latest service pack (SP1)? With that, I find that autoformat works well for me.

With regards to IntelliSense: it depends on what you're not seeing... ;-) IntelliSense in JavaScript is, due to the nature of JavaScript, not as perfect as it is for VB and C#. What are you expecting to see but not seeing?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 3rd, 2009, 11:20 AM
Authorized User
 
Join Date: Mar 2009
Posts: 64
Thanks: 0
Thanked 1 Time in 1 Post
Default

Imar,

I waited until I got to another javascript example to answer this.

I am using the latest SP, Version 3.5 SP1.

On p. 345 when I enter the function HelloWorld and the braces, and click Edit=>Advanced=>Format Document the function is not indented within the script tags. Typing code within the function does not indent. I am just used to it indenting. Not a big deal.

When adding the javascript Intellisense does not know about "yourName", even after compiling, but does know about "NameService". It also does not know about, or offer for fillin, "txtYourName" or "btnSayHello".

As I said, not a big deal, but the IntelliSense seems so sophisticated that I really miss not having it. Of course, I have written a little bit of assembler code and VS2008 is somewhat better.

Thomas
 
Old April 4th, 2009, 06:00 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It depends on what you expect from IntelliSense. Some of the stuff you mention won't work at all.

For example, txtYourName and btnSayHello are *HTML* controls and as such are not directly accessible in JavaScript (and thus not in IntelliSense). However, using something like:
Code:
 
document.getElementById('txtYourName')
would give you IntelliSense and offer properties like value.

Compilation is not an issue here; building the site compiles server side code; not client side code.

Indention works fine for me in the WebServices.aspx file, so maybe you have a layout issue or code error in that page so VWD can't correcly format the document?

For some more info on what (and what not) to expect from JavaScript IntelliSense:

http://weblogs.asp.net/scottgu/archi...ellisense.aspx
http://msdn.microsoft.com/en-us/library/bb385674.aspx
http://msdn.microsoft.com/en-us/library/bb385682.aspx


Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
IntelliSense? electrum BOOK: Beginning Microsoft SQL Server 2008 Programming ISBN: 978-0-470-25701-2 0 March 17th, 2009 11:10 AM
BizObject class - Intellisense? ViagraFalls BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 September 19th, 2007 02:24 PM
javascript intellisense & session object VictorVictor ASP.NET 2.0 Professional 0 March 29th, 2007 10:59 AM
Intellisense for UserControl RNedel ASP.NET 1.0 and 1.1 Basics 6 June 15th, 2004 04:47 AM
Intellisense stopped working in InterDev 6 riga1966 Classic ASP Professional 3 June 1st, 2004 05:31 AM





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