具有冒号问题的__doPostback方法 [英] __doPostback method with colons problem

查看:53
本文介绍了具有冒号问题的__doPostback方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在javascript中遇到了冒号这里讨论的问题
http://www.bdragon.com/条目/ 000324.shtml


基本上,我有嵌套控件并在以下行中获取错误:


theform = document._ctl0:frmPage;


我注意到了一个解决方案
http://msdn.microsoft.com/msdnmag/issues/02/10/WebQA/

但是,对于每个页面来说,这似乎是一个开销!


有没有人得到任何关于是否/何时以及如何修复这些更新的更新

求助于这些修复?对我来说似乎是一个相当基本的问题,

所以希望它已经修复了,我只是缺少一些升级或

热修复!!


谢谢,

史蒂文

解决方案

FWIW:


我发现基本的问题是我在用户控件中定义了



然后结果是ucForm。在__doPostBack方法中被引用为




theform = document._ctl0:ucForm;


失败JavaScript :(


任何修复?


Steven Livingstone< s。*********** @ btinternet.com>在留言中写道

新闻:%2 *************** @ TK2MSFTNGP10.phx.gbl ...

我正在进入javascript中的冒号这里讨论的问题
http://www.bdragon.com/entries/000324.shtml

基本上,我有嵌套控件并在以下行中获取错误:

theform = document._ctl0:frmPage;

我注意到了一个解决方案
http://msdn.microsoft.com/msdnmag/issues/02/10/WebQA/
然而,这似乎是每页的开销都很大!

有任何人都有任何更新,如果/何时以及如何解决这个问题,而无需采取这些修复措施?似乎是一个相当基本的问题
我,所以希望它已经修复了,我只是缺少一些升级
或热修复!!

谢谢,史蒂文



确定 - 我找到了1个方法(基于早期的uri)。


覆盖控件中的render方法并替换:对于控制名称

带有_。


到目前为止工作 - 有人试过这个并遇到任何问题吗?


仍然不是我想投入的东西:S $

" Steven Livingstone" < S *********** @ btinternet.com>。在消息中写道

新闻:%2 *************** @ TK2MSFTNGP10.phx.gbl ...

我正在运行进入javascript中的冒号这里讨论的问题
http://www.bdragon.com/条目/ 000324.shtml

基本上,我有嵌套控件并在一行上得到错误:

theform = document._ctl0:frmPage;

我注意到了一个解决方案
http://msdn.microsoft.com/msdnmag/issues/02/10/WebQA/
然而,对于每个页面来说,这似乎都是一个开销!

有没有人得到任何关于是否/何时以及如何解决这些问题的更新,而不是采取这些修复?似乎是一个相当基本的问题
我,所以希望它已经修复了,我只是缺少一些升级
或热修复!!

谢谢, Steven



JD JD - 我实际上已经编写了一个框架,它使用核心用户控件来实现
外观和感觉任何应用程序和所有它(可重复使用)sub

控件。我尝试了很多方法,但这是我能看到的唯一方式

它工作且仍然可以扩展。


这个主要控件托管另一个控件和页面充当一个简单的

容器,< form>包装在里面。所以控制本身永远不会在其父页面之外重复使用。


在其他情况下,我可能会编写完整的封装轮询控制。将

表单元素放入任何asp页面。我不在我的情况下,但是

我希望ASP.Net支持这种可能性!


干杯,

史蒂文。


" JD" < no@where.com>在留言中写道

news:05 **************************** @ phx.gbl ... < blockquote class =post_quotes>这里的想法是你永远不会在
用户控件中声明一个表单。在开发控件时,您不应该假设您的控件将被使用或不被使用。在你的情况下如果有人想在现有表格中使用你的
控件会发生什么?

- J

--- - 原始消息-----
FWIW:

我发现基本问题是我已经


FORM定义了

在一个用户控件中。
然后结果是ucForm。在


__ doPostBack方法中引用



theform = document._ctl0:ucForm;

失败JavaScript :(

任何修复?

Steven Livingstone< s。*********** @ btinternet.com>写道


在消息

新闻:%2 *************** @ TK2MSFTNGP10.phx.gbl ...

我遇到了javascript中的冒号问题,如此处所述 http ://www.bdragon.com/entries/000324.shtml

基本上,我有嵌套控件并在以下行中获取错误:
theform = document ._ctl0:frmPage;

我注意到了一个解决方案
http://msdn.microsoft.com/msdnmag/issues/02/10/WebQA/
然而,这看起来像是一团糟每页都有一个问题!
是否有任何关于是否/何时以及如何修复这些更新的更新而不诉诸这些修复?似乎是

我,

的一个相当


基本问题所以希望它已经修复了,我只是


缺少一些升级

hotfix !!

谢谢,
Steven





I am running into the "colon in javascript" problem as discussed here
http://www.bdragon.com/entries/000324.shtml.

Basically, i have nested controls and get the error on a line such as :

theform = document._ctl0:frmPage;

I noticed a solution at
http://msdn.microsoft.com/msdnmag/issues/02/10/WebQA/
However, this seems like a heck of an overhead for every page!

Has anyone got any updates on if/when and how this can be fixed without
resorting to these kind of fixes? Seems a fairly fundamental problem to me,
so hopefully it has already been fixed and i''m just missing some upgrade or
hot fix!!

thanks,
Steven

解决方案

FWIW :

I have discovered that the basic problem is that i have the FORM defined
within a usercontrol.
It then turns out that "ucForm" is referenced in the __doPostBack method as
:

theform = document._ctl0:ucForm;

Fails in JavaScript :(

Any fixes?

"Steven Livingstone" <s.***********@btinternet.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...

I am running into the "colon in javascript" problem as discussed here
http://www.bdragon.com/entries/000324.shtml.

Basically, i have nested controls and get the error on a line such as :

theform = document._ctl0:frmPage;

I noticed a solution at
http://msdn.microsoft.com/msdnmag/issues/02/10/WebQA/
However, this seems like a heck of an overhead for every page!

Has anyone got any updates on if/when and how this can be fixed without
resorting to these kind of fixes? Seems a fairly fundamental problem to me, so hopefully it has already been fixed and i''m just missing some upgrade or hot fix!!

thanks,
Steven



ok - 1 way around it i have found (based on an earlier uri).

Override the render method in the control and replace ":" for control names
with "_".

Works thus far - anyone tried this and run into any probs?

Still is not something i want to put into prod :S

"Steven Livingstone" <s.***********@btinternet.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...

I am running into the "colon in javascript" problem as discussed here
http://www.bdragon.com/entries/000324.shtml.

Basically, i have nested controls and get the error on a line such as :

theform = document._ctl0:frmPage;

I noticed a solution at
http://msdn.microsoft.com/msdnmag/issues/02/10/WebQA/
However, this seems like a heck of an overhead for every page!

Has anyone got any updates on if/when and how this can be fixed without
resorting to these kind of fixes? Seems a fairly fundamental problem to me, so hopefully it has already been fixed and i''m just missing some upgrade or hot fix!!

thanks,
Steven



Hi JD - I have actually written a framework which uses a core usercontrol to
implement the look and feel any application and all it''s (reusable) sub
controls. I tried a whole host of ways, but this is the only way i can see
it working and still be extensible.

This main control hosts the other controls and the page acts as a simple
container which the <form> wrapper in it. So that control itself is never
reused outside its parent page.

In other cases i may well write a full encapsulated "poll control" with the
form element to be just dropped into any asp page. I don''t in my case, but
i''d like ASP.Net to support that possibility!

Cheers,
Steven.

"JD" <no@where.com> wrote in message
news:05****************************@phx.gbl...

The idea here is that you never declare a form within a
user control. When developing controls you should never
assume where your controls will or will not be used. In
your case what happens if someone wants to use your
control inside an existing form?

- J

-----Original Message-----
FWIW :

I have discovered that the basic problem is that i have


the FORM defined

within a usercontrol.
It then turns out that "ucForm" is referenced in the


__doPostBack method as

:

theform = document._ctl0:ucForm;

Fails in JavaScript :(

Any fixes?

"Steven Livingstone" <s.***********@btinternet.com> wrote


in message

news:%2***************@TK2MSFTNGP10.phx.gbl...

I am running into the "colon in javascript" problem as discussed here http://www.bdragon.com/entries/000324.shtml.

Basically, i have nested controls and get the error on a line such as :
theform = document._ctl0:frmPage;

I noticed a solution at
http://msdn.microsoft.com/msdnmag/issues/02/10/WebQA/
However, this seems like a heck of an overhead for every page!
Has anyone got any updates on if/when and how this can be fixed without resorting to these kind of fixes? Seems a fairly


fundamental problem to

me,

so hopefully it has already been fixed and i''m just


missing some upgrade

or

hot fix!!

thanks,
Steven


.



这篇关于具有冒号问题的__doPostback方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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