简体   繁体   中英

Getting javascript error on asp.net textbox textmode=password

This is a very strange error, to me at least.

Using Visual Studio 2012. Using Internet Explorer version 11. Have an application that uses an asp:Textbox with textmode="password" When running from within Visual Studio, whenever I type or delete it comes up with an error in the script block

0x800a138f - JavaScript runtime error: Unable to get property 'getAttribute' of undefined or null reference

So after spending loads of time going through the code I decided to create a test site from scratch and start adding things to make it like my project so I can identify where the problem may be.

I created a project with the Asp.net Webforms template. Then I went directly (before I would try to make any changes) to the login page of the template site and tried to start typing in the password field, it immediately came up with the same error. Its fine in Chrome!

Its as though the thing that intercepts the characters in the textbox and turns them into dots is crashing in Internet Explorer...

No errors in the Chrome console.

What on Earth is it?

Right!

Found the answer, its something to do with the Visual Studio debugging settings. The particular project that I'm working on uses Silverlight. So just going into the properties settings then ticking the Silverlight debugger settings under the web tab changed the debug settings, now it doesn't stop and start debugging with every entered key in a password text box.

So just to be clear, I don't know what option was ticked before, but adding the tick to the Silverlight option meant that what ever was there before is now changed, so the problem is solved.

There is no code to present because I started it from a template. The debugger that I'm referring to is the debugger inside Visual Studio, as I was starting the application from Visual Studio.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM