Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Composite Control - Capturing post back when controls change

Reply
Thread Tools

Composite Control - Capturing post back when controls change

 
 
Darvin Zuch
Guest
Posts: n/a
 
      12-28-2003
Hi All,

I'm writting an exam control that reads an xml doc and
displays the questions.

I have a single submit button and a number of radio
buttons. I'm using CreateChildControls to create the
controls.

When I click the button and it fires the ButtonClicked
event. ie "AddHandler button1.Click, AddressOf
Me.ButtonClicked" but because I draw the next question on
a page refresh, the control array may be different and so
the clicked event doesn't always fire.

How do I design around this?

Darvin Zuch
Canada
 
Reply With Quote
 
 
 
 
Jos
Guest
Posts: n/a
 
      12-28-2003
Darvin Zuch wrote:
> Hi All,
>
> I'm writting an exam control that reads an xml doc and
> displays the questions.
>
> I have a single submit button and a number of radio
> buttons. I'm using CreateChildControls to create the
> controls.
>
> When I click the button and it fires the ButtonClicked
> event. ie "AddHandler button1.Click, AddressOf
> Me.ButtonClicked" but because I draw the next question on
> a page refresh, the control array may be different and so
> the clicked event doesn't always fire.
>
> How do I design around this?
>
> Darvin Zuch
> Canada


Always recreate the same controls on postback, then
handle the events, then destroy the controls that you don't
need and create new ones.

--

Jos


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How does a dynamic control load post back data across post back?? =?Utf-8?B?Z29yaWxsYQ==?= ASP .Net 1 05-25-2007 05:02 AM
Composite vs non composite Controls Mike ASP .Net Web Controls 4 03-11-2005 05:47 AM
Losing Composite Control property that another Composite Control ... Chad ASP .Net Building Controls 0 02-01-2005 09:01 PM
Possible to create a composite control that has a child control that is a validator that validates the composite control itself? Jonathan Eric Miller ASP .Net Building Controls 2 07-22-2004 10:58 PM
Composite control with dynamic composite controls sleigh ASP .Net 1 02-12-2004 06:24 PM



Advertisments