HighTechTalks DotNet Forums  

Reacting to events of a composite controls

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss Reacting to events of a composite controls in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Reacting to events of a composite controls - 09-08-2004 , 10:47 PM






I have read some tutorials on composite controls. They all all tend to
be on static controls such as tables etc. They don't seem to cover on
dealing with user events on the controls.

I have created some LinkButtons on a composite control, but I need to
be able to react to which of these linkbuttons the user presses.
So I need set parameters of onCommand CommandArgs for the linkbuttons.
BUt I cannot add these when creating the controls.


I tried this

lbtn.CommandName = "openSub"
lbtn.CommandArgument = "subArgs"
lbtn.Visible = True

Controls.Add(lbtn)


Only the visible works these rest dont show up on the HTML page.


Is there a way to do this?

Thanks

Reply With Quote
  #2  
Old   
Jos
 
Posts: n/a

Default Re: Reacting to events of a composite controls - 09-13-2004 , 02:54 AM






ree32 wrote:
Quote:
I have read some tutorials on composite controls. They all all tend to
be on static controls such as tables etc. They don't seem to cover on
dealing with user events on the controls.

I have created some LinkButtons on a composite control, but I need to
be able to react to which of these linkbuttons the user presses.
So I need set parameters of onCommand CommandArgs for the linkbuttons.
BUt I cannot add these when creating the controls.


I tried this

lbtn.CommandName = "openSub"
lbtn.CommandArgument = "subArgs"
lbtn.Visible = True

Controls.Add(lbtn)


Only the visible works these rest dont show up on the HTML page.


Is there a way to do this?

Thanks
Take a look at the AddHandler function.

Look here for a tutorial that covers user events in composite controls:
http://www.dotnetjunkies.com/quickstart/aspplus/doc/webctrlauthoring.aspx#postbackevts

--

Jos




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.