的Page_Load [英] Page_Load

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

问题描述

嗨。


我在网络表单上有一个名为btnSelect的按钮。它有一个处理程序。

然而,在调用处理程序之前调用Page_Load()。


我想要执行以下操作。在Page_Load()中,我想检查

btnSelect是否导致了该事件。我该怎么办?


请帮忙。


-

很酷!

解决方案

看看Request对象中可用的值;你应该能够找到你需要的信息,因为所有信息都是通过

POST提交的表格发送的。


但是,我不确定这是正确的做法。相反,你应该在一个子程序中隔离相关代码并从btnSelect

事件中调用它。


SL


" thejackofall" <第********** @ discussions.microsoft.com>在留言中写道

新闻:B8 ********************************** @ microsof t.com ...

嗨。

我在网络表单上有一个名为btnSelect的按钮。
它有一个处理程序。
然而,在调用处理程序之前调用Page_Load()。

我想执行以下操作。在Page_Load()中,我想检查
btnSelect是否导致了该事件。我该怎么做?

请帮忙。

-
很酷!



是。你对帖子的表单提交是正确的。我可以获得

的信息。然而,这是一个不同的故事。


这与回发和捕获事件有关。


问题是,我如何检查导致此事件的对象是什么?

来到Page_Load()?"。


请帮助。


" Sylvain Lafontaine"写道:

看看可用的值int对象;你应该能够找到你需要的信息,因为表格中提交的所有信息都是在那里提交的。

但是,我不确定是不是这是正确的做法。相反,你应该在子程序中隔离相关代码并从btnSelect
事件中调用它。

S. L.

thejackofall <第********** @ discussions.microsoft.com>在消息中写道
新闻:B8 ********************************** @ microsof t.com。 ..

嗨。

我在网络表单上有一个名为btnSelect的按钮。
它有一个处理程序。
然而,在调用处理程序之前调用Page_Load()。

我想执行以下操作。在Page_Load()中,我想检查
btnSelect是否导致了该事件。我该怎么办?

请帮忙。

-
很酷!




对不起,但我不知道你问题的答案。


也许下面的文章会给你一个

研究的起点:
http://msdn.microsoft.com/library/de...bjectmodel.asp


SL


" thejackofall" <第********** @ discussions.microsoft.com>在消息中写道

news:37 ********************************** @ microsof t.com ...

是的。你对帖子的表单提交是正确的。我可以获得
的信息。然而,这是一个不同的故事。

这更多地与回发和捕获事件有关。

问题是,我如何检查导致此问题的对象活动来
来到Page_Load()?"。

请帮助。

Sylvain Lafontaine写道:

看看可用的值int对象;你应该能够找到你需要的信息,因为表格中提交的所有信息都是在那里提交的。

然而,我是''我不确定这是正确的做法。相反,你应该在子程序中隔离相关代码并从btnSelect
事件中调用它。

SL

" thejackofall" <第********** @ discussions.microsoft.com>在消息中写道
新闻:B8 ********************************** @ microsof t.com。 ..

>嗨。
>
>我在网络表单上有一个名为btnSelect的按钮。有一个处理程序
>对于
>它。
>但是,在调用处理程序之前调用Page_Load()。
>
>我想做以下事情。在Page_Load()中,我想检查是否
> btnSelect造成了这一事件。我怎么能这样做?
>
>请帮忙。
>
> -
>很酷!




Hi.

I have a button called btnSelect on a web form. There is a handler for it.
However, the Page_Load() gets called before the handler gets called.

I want to do the following. In the Page_Load(), I want to check if the
btnSelect caused the event. How can I do this?

Please help.

--
Be Cool!

解决方案

Take a look at the values available int Request object; you should be able
to find the information you need because all the information send by the
POST submission of the form is there.

However, I''m not sure is this is the right thing to do. Instead, you should
isolate the relevant code in a subroutine and call it from the btnSelect
event.

S. L.

"thejackofall" <th**********@discussions.microsoft.com> wrote in message
news:B8**********************************@microsof t.com...

Hi.

I have a button called btnSelect on a web form. There is a handler for
it.
However, the Page_Load() gets called before the handler gets called.

I want to do the following. In the Page_Load(), I want to check if the
btnSelect caused the event. How can I do this?

Please help.

--
Be Cool!



Yes. You are right about the form submission with the post. I can get the
information. However, this is a little different story.

This has more to do with postback and capturing events.

The question is, "How do I check what object caused this event for it to
come to Page_Load()?".

Please help.

"Sylvain Lafontaine" wrote:

Take a look at the values available int Request object; you should be able
to find the information you need because all the information send by the
POST submission of the form is there.

However, I''m not sure is this is the right thing to do. Instead, you should
isolate the relevant code in a subroutine and call it from the btnSelect
event.

S. L.

"thejackofall" <th**********@discussions.microsoft.com> wrote in message
news:B8**********************************@microsof t.com...

Hi.

I have a button called btnSelect on a web form. There is a handler for
it.
However, the Page_Load() gets called before the handler gets called.

I want to do the following. In the Page_Load(), I want to check if the
btnSelect caused the event. How can I do this?

Please help.

--
Be Cool!




I''m sorry, but I don''t know the answer to your question.

Maybe the following article will give you a starting point for your
research:
http://msdn.microsoft.com/library/de...bjectmodel.asp

S. L.

"thejackofall" <th**********@discussions.microsoft.com> wrote in message
news:37**********************************@microsof t.com...

Yes. You are right about the form submission with the post. I can get
the
information. However, this is a little different story.

This has more to do with postback and capturing events.

The question is, "How do I check what object caused this event for it to
come to Page_Load()?".

Please help.

"Sylvain Lafontaine" wrote:

Take a look at the values available int Request object; you should be
able
to find the information you need because all the information send by the
POST submission of the form is there.

However, I''m not sure is this is the right thing to do. Instead, you
should
isolate the relevant code in a subroutine and call it from the btnSelect
event.

S. L.

"thejackofall" <th**********@discussions.microsoft.com> wrote in message
news:B8**********************************@microsof t.com...

> Hi.
>
> I have a button called btnSelect on a web form. There is a handler
> for
> it.
> However, the Page_Load() gets called before the handler gets called.
>
> I want to do the following. In the Page_Load(), I want to check if the
> btnSelect caused the event. How can I do this?
>
> Please help.
>
> --
> Be Cool!




这篇关于的Page_Load的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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