Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Client Side VBSCRIPT - Strange behavior in VS2008

Status
Not open for further replies.

ericgeil

Programmer
Apr 9, 2009
4
US
When I add a client side script block to my aspx page in VS.net 2008, I get some peculiar results...

1 - If I use VBSCRIPT as the language, it will not debug it or give any context-specific help...For example, if i type in my form name then ".", i would expect to see a popup list of properties and methods for my form. I get nothing. It doesnt highlight syntax errors or anything. If I change it to javascript it does.

2 - As soon as i add the script block, it starts highlighting all sorts of other "errors" both within the script block, and in my html. Things like "attribute must be enclosed in quotation marks", and something about upper case letters not being allowed?? Since when??

That being said, my client side vbscript IS working in the browser, but this is very annoying. It is rather difficult to debug this way (especially number 1). How can I get the syntax checking features to work for vbscript?

Thanks in advance...
Eric
 
have you tried google? some of the warnings you receive are standards warnings, they will not cause errors, but they don't meet the standards.

VS may help with intellisense if it knows what script language it is. VS has never been very friendly with scripting IS, so i wouldn't except much.

I know they added jquery intellisense, but that requires a schema script update "thing" basically a text file which tells VS how to parse the javascipt. something similar may exist for vbscript.

all that said I would question why vbscript instead of javascript + 3rd party framework (jquery, prototype, dojo).

there may also be a setting within VS to disable script errors and/or change scripting errors to warnings.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Basically I'm using VB Script because that's what the other 1000+ pages of our (ASP) site use. It's an intranet site, where all the users use IE exclusively, so that's not an issue. I will probably move to javascript in the end, but I'm trying to learn one language at a time (just now starting asp.net...have used ASP with VB Script client side code up until now.

I started using VS.NET 2003 where the intellisense DID work for the vbscript code. Just upgraded to 2008 and it doesn't. Seems like there has to be a setting for this? Or something I need to add?

 
maybe, it could also be (pure conjecture) that they are not supporting it and favoring JS instead.

BTW ASP.Net != webforms. asp.net is the pipeline to handle http request/response. webforms is an html engine. webforms requires asp.net, but asp.net only requires the .net framework. this is common misunderstanding since MS promotes webforms so heavily.

since asp.net is indepent of the html engine that runs on top of it other web frameworks are avialable(FUBU MVC, MS MVC, Monorail). I would highly recommend any of these frameworks over webforms.

some love webforms because of the wizards and drag/drop coding. others loath webforms because of the complex abstractions on a simple concept like html.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top