 |
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
|
|
|
|
|

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

May 4th, 2011, 06:07 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

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

May 4th, 2011, 10:18 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

May 4th, 2011, 11:57 AM
|
|
Registered User
|
|
Join Date: Apr 2011
Posts: 26
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Quote:
Originally Posted by Imar
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
|
|

May 4th, 2011, 12:19 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
 |
|