Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Henk #1
IPostBackEventHandler question
Hey All,
I have a question about the IPostbackEventHandler interface. This
interface's RaisePostBackEvent method has an eventArgument paramter. When my
control has two buttons, I can use eventArgument to see what button was
clicked, since I set their onclick attribute with the
Page.ClientScript.GetPostBackEventReference(...) method.
When I then implement the IPostBackDataHandler interface, and call the
Page.RegisterRequireRaiseEvent, the RaisePostBackEvent still gets called
but the eventArgument parameter is always null? Why is this?
I know I can use the postCollection parameter in
IPostBackDataHandler::LoadPostData to check which button was clicked, but is
wonder why the IPostbackEventHandler::RaisePostBackEvent is not usable for
it anymore?
regards,
Henk
Henk Guest
-
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you
<RonGrossi382872@yahoo.com> wrote in message news:1114393703.900419.199790@f14g2000cwb.googlegroups.com... This is the most important question of... -
newB question: related tables question
hello i have a data base with 10 tables, i want to automaticaly creat a row in all of the tables wehen i create in the first one. normal table... -
Teemu Keiski #2
Re: IPostBackEventHandler question
It's implemented internally in Framework so that control getting registered
via RegisterRequiresRaiseEvent won't get the event argument (null is
passed). I suppose it is indeed presumed that it would be used in scenario
when the data is available with other means (postCollection in your case).
other is that Framework doesn't specifically keep track of the registered
control at that point (it hapåpens after postback data has been processed)
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
[url]http://blogs.aspadvice.com/joteke[/url]
"Henk" <SomeOne@the.Net> wrote in message
news:OYO1HbdBHHA.1220@TK2MSFTNGP04.phx.gbl...> Hey All,
>
>
> I have a question about the IPostbackEventHandler interface. This
> interface's RaisePostBackEvent method has an eventArgument paramter. When
> my control has two buttons, I can use eventArgument to see what button was
> clicked, since I set their onclick attribute with the
> Page.ClientScript.GetPostBackEventReference(...) method.
>
> When I then implement the IPostBackDataHandler interface, and call the
> Page.RegisterRequireRaiseEvent, the RaisePostBackEvent still gets called
> but the eventArgument parameter is always null? Why is this?
>
> I know I can use the postCollection parameter in
> IPostBackDataHandler::LoadPostData to check which button was clicked, but
> is wonder why the IPostbackEventHandler::RaisePostBackEvent is not usable
> for it anymore?
>
>
> regards,
>
> Henk
>
>
Teemu Keiski Guest



Reply With Quote

