Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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 May 4th, 2011, 06:04 AM
Registered User
 
Join Date: Apr 2011
Posts: 26
Thanks: 0
Thanked 1 Time in 1 Post
Default jscript attributes & intellisense

when I follow certain excercises on the book and code in javascript, some attributes and properties don't show up in intellisense!? is there a way to update intellisense on VS ?!

thanks
 
Old May 4th, 2011, 06:07 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi tjere,

Can you provide an example? E.g. on what page or control are you working, what JavaScritp do you use, where are your script references located and what code are you writing?

JavaScript IntelliSense is - by design - far from perfect, so what you see might be just the way it is...

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 May 4th, 2011, 08:28 AM
Registered User
 
Join Date: Apr 2011
Posts: 26
Thanks: 0
Thanked 1 Time in 1 Post
Default

for example; on following your : Checking the Existence of an ASP.NET Membership Username with ASP.NET AJAX tutorial, when i type the following code:

Code:
errorMessage.style.color = 'red';
on typing errorMessage.s intellisense shows many suggestions but it doesn't show style property the same goes to errorMessage.innerText ...etc
 
Old May 4th, 2011, 10:18 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yeah, that's by design. I don't think the IntelliSense engine is able to infer the true type of the variable and doesn't really know it's a span tag that has a style attribute. In this case, it's a Fact of Life, I am afraid.

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!
 
Old May 4th, 2011, 11:57 AM
Registered User
 
Join Date: Apr 2011
Posts: 26
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by Imar View Post
Yeah, that's by design. I don't think the IntelliSense engine is able to infer the true type of the variable and doesn't really know it's a span tag that has a style attribute. In this case, it's a Fact of Life, I am afraid.

Cheers,

Imar
true but most of elements if not all DO have a style attribute, thats why i thought it should be available in intellisense
 
Old May 4th, 2011, 12:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, but I doubt VWD really knows that. Since JavaScript is not strongly typed, Visual Studio needs to infer variable types by parsing the code. My guess is that it just doesn't know that errorMessage is a span with a style attribute.

Microsoft is constantly improving IntelliSense, and a lot of work has been done in the area of JavaScript. Maybe future versions have better support for this, but for now this is what's available.

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
Display HTML Attributes from XML Attributes rangeshram XSLT 3 March 27th, 2010 01:14 PM
javascript and Intellisense member4953 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 April 4th, 2009 06:00 AM
IntelliSense? electrum BOOK: Beginning Microsoft SQL Server 2008 Programming ISBN: 978-0-470-25701-2 0 March 17th, 2009 11:10 AM
javascript intellisense & session object VictorVictor ASP.NET 2.0 Professional 0 March 29th, 2007 10:59 AM
Linux & KDE & C++ & QT & MYSQL & Kdevelop Munnnki Linux 0 January 2nd, 2005 05:41 PM





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