Ask a Question related to ASP.NET Building Controls, Design and Development.
-
@rturo #1
capture Multiple events in server controls
Im try to build a control with multiple events rised by different elements
but can't find any advanced example that can help me with this.
In the case of GridView, it fires many events, one of those is
SelectedIndexChaged and other is RowDeleted. when you look at the client
script they produce "__doPostBack('GridView1','Select$[index]')" and
"__doPostBack('GridView','Delete$[index]')"
Is this something i need to create through RaisePostBackEvent to recognize
the second argument? or is something already implemented in webcontrol class.
All Microsoft examples only show the RaisePostBackEvent(string
eventArgument) just with one event like OnClick and the stringArgument is not
used, but what if a i want to work with many events in my control and what if
they affect just one item of a collection.
Please refer me to a good source where i can get advanced help on this matter.
Thanks
@rturo Guest
-
Custom web control - Unable to capture events with AddHandler in an ITemplate
Ok, I know this has been asked a lot. And I see a lot on the topic, but things are a little different here and it's still not quite working for... -
Controls events not firing
Hi, I created a Main.aspx that contains a custom control, as follows: <body> <Sigma:pagebody id="pdbTemplate" runat="server"... -
Nesting server controls with a composite control don't generate postback events
Hi, I am new to web controls so please forgive me if my terminology is not 100%! I am attempting to develop a composite control, based heavily... -
Handling Events in Nested Controls
Hi, I have nested User Controls like below. User_Control_1 User_Control_11 User_Control_12(contains method DisplayMessage) ... -
Teemu Keiski #2
Re: capture Multiple events in server controls
Hi,
yes you do check this via RaisePostBackEvent and there raise different
events based on the string argument.
Here is one article covering the aspects:
[url]http://www.code-magazine.com/articleprint.aspx?quickid=0511051&printmode=true[/url]
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
[url]http://blogs.aspadvice.com/joteke[/url]
"@rturo" <rturo@discussions.microsoft.com> wrote in message
news:F67E8879-A9A2-4EBE-9654-F317884B01BD@microsoft.com...> Im try to build a control with multiple events rised by different elements
> but can't find any advanced example that can help me with this.
>
> In the case of GridView, it fires many events, one of those is
> SelectedIndexChaged and other is RowDeleted. when you look at the client
> script they produce "__doPostBack('GridView1','Select$[index]')" and
> "__doPostBack('GridView','Delete$[index]')"
>
> Is this something i need to create through RaisePostBackEvent to recognize
> the second argument? or is something already implemented in webcontrol
> class.
>
> All Microsoft examples only show the RaisePostBackEvent(string
> eventArgument) just with one event like OnClick and the stringArgument is
> not
> used, but what if a i want to work with many events in my control and what
> if
> they affect just one item of a collection.
>
> Please refer me to a good source where i can get advanced help on this
> matter.
>
> Thanks
Teemu Keiski Guest



Reply With Quote

