Request.Form(" __ EVENTTARGET")="" ??? [英] Request.Form("__EVENTTARGET") = "" ???

查看:78
本文介绍了Request.Form(" __ EVENTTARGET")="" ???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用

Request.Form(" __ EVENTTARGET")来获取导致回发的控件的名称。它不断返回。


我不太清楚为什么,这种情况发生在我调用的所有控件上都在调用帖子。


我已经从来没有使用过这种类型的方法,但我需要在Form Load事件中获取控件的名称,并且不能等到由于回发而运行的目标控件的事件。

解决方案

尝试Request.Form(" __ EVENTARGUMENT")


:)

Mythran

" Dan" <无******** @ nowhere.com>在消息中写道

新闻:Od ************** @ TK2MSFTNGP10.phx.gbl ...

我正在尝试使用

Request.Form(" __ EVENTTARGET")获取导致

回发的控件的名称。它一直返回。


我不太确定为什么,这种情况发生在我调用的所有控件上都是

调用回发。


我之前从未使用过这种类型的方法,但我需要在Form Load事件中获取回发的

控件的名称,并且不能等到由于回发而运行的目标控件的

事件。


相同..


只是一个空白字符串

" Mythran" <き******** @ hotmail.com>在消息新闻中写道:uH ************** @ TK2MSFTNGP12.phx.gbl ...

尝试Request.Form(" __ EVENTARGUMENT")


:)


Mythran

" Dan" <无******** @ nowhere.com>在消息新闻中写道:Od ************** @ TK2MSFTNGP10.phx.gbl ...

我正在尝试使用

Request.Form(" __ EVENTTARGET")获取导致回发的控件的名称。它不断返回。


我不太清楚为什么,这种情况发生在我调用的所有控件上都在调用帖子。


我已经从来没有使用过这种类型的方法,但我需要在Form Load事件中获取控件的名称,并且不能等到由于回发而运行的目标控件的事件。


我已经要求它,因为我有相同的pb,因为我将framework1.0更改为1.1!


答案:

这不是使用Request.Form [" __ EventTarget"]和eventArgument的好方法,因为Microsoft不保证事件引用将始终像这样调用。


Aurel

" Dan" <无******** @ nowhere.com> écritdansle message de news:#n ************** @ TK2MSFTNGP11.phx.gbl ...

相同..


只是一个空白字符串

" Mythran" <き******** @ hotmail.com>在消息新闻中写道:uH ************** @ TK2MSFTNGP12.phx.gbl ...

尝试Request.Form(" __ EVENTARGUMENT")


:)


Mythran

" Dan" <无******** @ nowhere.com>在消息新闻中写道:Od ************** @ TK2MSFTNGP10.phx.gbl ...

我正在尝试使用

Request.Form(" __ EVENTTARGET")获取导致回发的控件的名称。它不断返回。


我不太清楚为什么,这种情况发生在我调用的所有控件上都在调用帖子。


我已经从来没有使用过这种类型的方法,但我需要在Form Load事件中获取控件的名称,并且不能等到由于回发而运行的目标控件的事件。


I am trying to use
Request.Form("__EVENTTARGET") to get the name of the control that caused a post back. It keeps returning "".

I am not really sure why, this happens for all of my controls that invoke are invoking a post back.

I''ve never used this type of method before, but I need to get the name of the control doing the postback in the Form Load event, and cannot wait until the event of the target control that runs due to the postback.

解决方案

Try Request.Form("__EVENTARGUMENT")

:)

Mythran
"Dan" <no********@nowhere.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
I am trying to use
Request.Form("__EVENTTARGET") to get the name of the control that caused a
post back. It keeps returning "".

I am not really sure why, this happens for all of my controls that invoke are
invoking a post back.

I''ve never used this type of method before, but I need to get the name of the
control doing the postback in the Form Load event, and cannot wait until the
event of the target control that runs due to the postback.


same..

just a blank string
"Mythran" <ki********@hotmail.com> wrote in message news:uH**************@TK2MSFTNGP12.phx.gbl...
Try Request.Form("__EVENTARGUMENT")

:)

Mythran
"Dan" <no********@nowhere.com> wrote in message news:Od**************@TK2MSFTNGP10.phx.gbl...
I am trying to use
Request.Form("__EVENTTARGET") to get the name of the control that caused a post back. It keeps returning "".

I am not really sure why, this happens for all of my controls that invoke are invoking a post back.

I''ve never used this type of method before, but I need to get the name of the control doing the postback in the Form Load event, and cannot wait until the event of the target control that runs due to the postback.


I have already ask for it, because I have the same pb since i change my framework1.0 to 1.1 !

The answer:
It is not a good way to use Request.Form["__EventTarget"] and eventArgument because Microsoft don''t guaranteed that event reference will be always call like this.

Aurel
"Dan" <no********@nowhere.com> a écrit dans le message de news: #n**************@TK2MSFTNGP11.phx.gbl...
same..

just a blank string
"Mythran" <ki********@hotmail.com> wrote in message news:uH**************@TK2MSFTNGP12.phx.gbl...
Try Request.Form("__EVENTARGUMENT")

:)

Mythran
"Dan" <no********@nowhere.com> wrote in message news:Od**************@TK2MSFTNGP10.phx.gbl...
I am trying to use
Request.Form("__EVENTTARGET") to get the name of the control that caused a post back. It keeps returning "".

I am not really sure why, this happens for all of my controls that invoke are invoking a post back.

I''ve never used this type of method before, but I need to get the name of the control doing the postback in the Form Load event, and cannot wait until the event of the target control that runs due to the postback.


这篇关于Request.Form(&quot; __ EVENTTARGET&quot;)=&quot;&quot; ???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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