Asp.Net页面中javascript的运行时错误 [英] runtime error of javascript in Asp.Net page

查看:59
本文介绍了Asp.Net页面中javascript的运行时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在执行此操作时遇到了一些问题:
我将使用gridview并将其与数据源绑定,并添加了命令字段"edit,update,cancel".
我通过启用像这样的下拉列表回发来在此页面上进行重定向:

I got some problem by doing this:
I''d taken a gridview and bound it with data source and added command field ''edit,update, cancel''.
I made a redirection on this page by enabling post back of a dropdownlist like this:

if (taskmanager.SelectedItem.Text == "Contacts")
       {
           Response.Redirect("adrsbook.aspx");
       }


当我单击编辑列时,运行此页面时出现以下错误
javascript运行时错误:找不到成员
为什么我会收到此错误?
以及如何克服这个问题?


on running this page when i click on edit column i get following error
javascript runtime error:member not found
Why I''m getting this error?
and How to overcome from this?

推荐答案

问题不在您的代码中.它与Java脚本有关,如果您尝试加载任何js文件或编写了任何JavaScript函数,则在您的网页中,它将与您在该JavaScript函数上使用的某些对象或成员发生冲突,并且出现此错误.您在使用IE时会收到该错误,如果您在使用Firefox或任何其他浏览器,则无法直接得到该错误,该错误将由"CTRL + SHIFT + J"显示,这将打开一个窗口,该窗口将显示与JavaScript相关的错误或警告列表.如果删除该javascript函数/加载任何js文件,则它不会引发任何错误,但是会停止您应该由javascript的那部分完成的某些功能.
the issue is not in your code. it is related to your java script, in your webpage if you are trying to load any js files or you have write any JavaScript function then it will conflict with its some object or member you used on that JavaScript function and you got that error. you can get that error while you are using IE, if you are using Firefox or any other browser then you can''t directly get that error it will shown by "CTRL + SHIFT + J", this will open a window which will show that error or warning list related to JavaScript. if you remove that javascript function/loading any js files then it will not throwing any error, but it will stops your some functionality suppose to done by that part of javascript.


这篇关于Asp.Net页面中javascript的运行时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆