且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将调试器放入RegisterClientScriptBlock

更新时间:2023-12-05 23:20:46

您提供的代码行仅将第二个参数注册到客户端脚本块.这意味着它将提供给浏览器执行.

换句话说,代码不会在这里执行,而是会在浏览器中执行.(它是JavaScript之后,只能与浏览器一起使用).

您想在这里看到哪些值?是txtIdentifierXml.value吗?
如果是,则如上所述,该值将在此处不可用.执行脚本后,您应该在警报中获取该值.

提供了您的document.forms(0).txtIdentifierXml不为空
The line of code you have given just registers the second argument to the client script block. Which means it will be given to the browser to execute.

In other words the code will not be executed here but it will be executed at the browser.(After it is a javascript, bound to work with browser only).

Which value you want to see here? Is it txtIdentifierXml.value?
If yes, As stated above that value will not be available here. When the script is executed you should get the value in the alert.

Provided your document.forms(0).txtIdentifierXml is not null