Ask a Question related to ASP.NET General, Design and Development.
-
Todd Acheson #1
Re: Dynamic ASP.NET button control
Victor,
That's the missing link.
Thank You!
-Todd
"Victor Garcia Aprea [MVP]" <vga@NOobiesSPAM.com> wrote in message
news:eThRfXbTDHA.1552@TK2MSFTNGP12.phx.gbl...to> Hi Todd,
>
> You can declare an event handler for Button.Click event. You don't need to
> declare one handler per button, you could just attach the same handler to
> all button's Click events and inside the single handler determine which
> button fired the event.
>
> --
> Victor Garcia Aprea
> Microsoft MVP | ASP.NET
> Looking for insights on ASP.NET? Read my blog:
> [url]http://obies.com/vga/blog.aspx[/url]
> To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
> and not by private mail.
>
> "Todd Acheson" <tacheson@questared.com> wrote in message
> news:eDryhYXTDHA.1556@TK2MSFTNGP10.phx.gbl...> <asp:placeholder>> > Attention all Guru's,
> > Let's say I create a control at runtime similar to this:
> >
> > 'this is one button within a loop that creates many buttons
> >
> > Dim ctl as New System.Web.UI.WebControls.Button
> > ctl.ID = strID 'strID is dynamic, a field from the database
> > ctl.Width = System.Web.UI.WebControls.Unit.Pixel(100)
> > ctl.Text = strButtonText ' strButtonText is dynamic, a field from the
> > database
> > plcPlaceHolder1.Controls.Add(ctl) ' plcPlaceHolder1 is a> to> > sandwiched in the web page's HTMLForm
> >
> > When the user clicks this dynamically added button, what is the best way> is> > capture the event and execute some code in the codebehind file?
> > I can find out what button was clicked with the Request.Form object, but> > this the most effecient way to find out, and if so, what's the best way>> > execute code for it? Will late binding play any part?
> >
> > thanks for your time,
> >
> > Todd Acheson
> >
> >
> >
>
Todd Acheson Guest
-
Making a dynamic button
I am bringing into flash xml files via a web service connector and a data set component. Bound to these are are various components to retreive... -
Button with Dynamic Textfield?
I've got a button called "areaButton_btn" and inside that button is a dynamic textfield called "buttonTitle_txt". This textfield is on all the... -
[COCOA] Dynamic button?
In article <1fzrife.s6p9421wrpd7mN%usenet@mile23.com>, usenet@mile23.com (Paul Mitchum) wrote: This will only work if the button actually... -
adding dynamic content to a button
Hi. I am having a small problem. I am trying to add a dynamic attribute to a regular html button, but I also have a runat="server" attribute on... -
dynamic button - does not go to handler
Hi here is what I am doing - building a table dynamically HtmlTableRow objRow = new HtmlTableRow(); tblStuff.Rows.Add(objRow); ...



Reply With Quote

