ASP:button

Discussion in 'ASP .Net Datagrid Control' started by Lam, May 13, 2005.

  1. Lam

    Lam Guest

    I want to dynamic generate a asp:button in C# class, not in the HTML code
    so that it can call the methods in the c# class,
    I try to use "Response.Write("<asp:button...>")
    it didn't show the button
    Can anyone help?

    Thanks a lot
     
    Lam, May 13, 2005
    #1
    1. Advertisements

  2. Hi Lam,

    The usual way is to put a placeholder control on your form and add the
    button controls to its controls collection. There's an example here that
    creates textboxes:

    http://aspnet.4guysfromrolla.com/articles/082102-1.aspx

    "Lam" <> wrote in message
    news:e7KT$F%...
    >I want to dynamic generate a asp:button in C# class, not in the HTML code
    > so that it can call the methods in the c# class,
    > I try to use "Response.Write("<asp:button...>")
    > it didn't show the button
    > Can anyone help?
    >
    > Thanks a lot
    >
    >
    >
     
    Ken Cox [Microsoft MVP], May 14, 2005
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Purvi T
    Replies:
    0
    Views:
    1,152
    Purvi T
    Oct 19, 2004
  2. Wes Weems
    Replies:
    1
    Views:
    622
    Natty Gur
    Jul 20, 2003
  3. Chris Lane
    Replies:
    4
    Views:
    11,668
    Chris Lane
    Nov 17, 2003
  4. =?Utf-8?B?U3BlbmNlciBILiBQcnVl?=

    In asp event occurs once for textbox.textchanged AND button.button

    =?Utf-8?B?U3BlbmNlciBILiBQcnVl?=, Jun 13, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    804
    =?Utf-8?B?SmFzb24gTCBMaW5k?=
    Jun 13, 2005
  5. Mossman
    Replies:
    0
    Views:
    981
    Mossman
    Dec 12, 2005
  6. phancey
    Replies:
    3
    Views:
    2,805
  7. MU
    Replies:
    0
    Views:
    735
  8. Sam
    Replies:
    1
    Views:
    1,827
    Brian Kenneth Nielsen
    Nov 25, 2008
Loading...