troubleshooting Question

ASP-Microsoft JScript runtime error: Object expected.

Avatar of arvee2003
arvee2003 asked on
8 Comments1 Solution794 ViewsLast Modified:

Using vs2008 and c#.

In my development enironment I have 2 website with identical folder structure. And my master pages for
both website are almost similar.

In both the application I have some javascript referenced for counting the number of characters entered as follows:

 <script type="text/javascript" src='<%# Page.ResolveUrl("~/Javascript/textcounter.js") %>'> </script>

It works perfectly fine in one website. However in the other website onkeypress it was trying the javascript function
and it gives the following error.
      Microsoft JScript runtime error: Object expected

I am not sure why it is working on one website and not on the other.

Both VS2008 and the 2 website are all on the same machines.

Looks like it is something specific to a website.

This happens when debugging application using IE. When I ran in Chrome it is not displaying the error.

Is there any issues in webconfig files? All my reference are ok.

It is was working ok 2 days ago and I did not install anything.

Any input is appreciated.


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros