Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Need to create buttons(that throw events) AFTER i receive an event from another button.

Reply
Thread Tools

Need to create buttons(that throw events) AFTER i receive an event from another button.

 
 
smyersm@gmail.com
Guest
Posts: n/a
 
      07-07-2005
I have a back and next button that fire to move along a list.

On Page Load:
get the list from the server
assume active item is from the session
everything loaded
On button click:
receive event from back/next
replace active item with real active item
save new index to session

the control automatically renders the children controls.

I'm using a standard LinkButton element with 'addHandler'

On default i load 1 linkbutton, when it's clicked i want 4 link buttons
to show up. When one of those 4 is clicked, i want to say "hey, you
clicked item#"

Let's show some code:

Protected Overrides Sub CreateChildControls()
loadDefaultOrder()
End Sub
Private Sub loadDefaultOrder()
Response.Write("loading default sessioned order")

cmdList.addLink("default")
AddHandler cmdList.Click, AddressOf handle_itemClick
actionContainer.Controls.Add(cmdList)
End Sub
Private Sub updateRealOrder()
Response.Write("loading actual clicked order")

cmdList.addLink("test1")
cmdList.addLink("test2")
AddHandler cmdList.Click, AddressOf handle_itemClick
End Sub
Private Sub navPane_Click(ByVal Index As Short) Handles
navPane.Click
updateRealOrder()
End Sub


All items in "loadDefaultOrder" always work, they throw events. (yay).
All items in "updateRealOrder" show up on the screen, but don't throw
events.

Thoughts? Isn't it possible to create a number of controls based upon
postback information?

Thanks!

 
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
To throw or to throw not? Emanuele D'Arrigo Python 6 11-15-2008 04:12 PM
JNI's throw new does not throw an exception yarona@m-sys.com Java 15 09-08-2005 08:36 AM
throw an application wide event in an asp.net page PrashanthNagaraj ASP .Net 2 11-24-2003 12:48 AM
Throw Exception Vs Throw New Exception Kerri ASP .Net 2 10-27-2003 02:13 PM
Only One Tkinter Entry can receive key event event in Linux RH8.0 wang xiaoyu Python 0 06-25-2003 04:44 AM



Advertisments