Composite control links do not postback

Last post 06-29-2009 11:19 AM by phfle1. 3 replies.

Sort Posts:

  • Composite control links do not postback

    06-29-2009, 12:07 AM
    • Member
      17 point Member
    • phfle1
    • Member since 09-28-2007, 1:06 PM
    • Posts 79

    Hi,

    I am creating a simple control that inherits from compositeControl.

    The control is a list of linkbuttons.

    Usually, when the linkbutton render, it includes something like javascript:_doPostBack(...) which tells the client to postback and not to follow the link directly.

    My problem is that it is not my case.

    Here is part of my overrided render method (mListeLiens is a list of linkbuttons)

    vWriter.RenderBeginTag(HtmlTextWriterTag.Li)
    mListeLiens(index).RenderControl(vWriter)
    vWriter.RenderEndTag()

    Does my controls need to be added to Page.Form.Controls, or do they have to be in a panel...or something else?

    Thanks,


    Phil




  • Re: Composite control links do not postback

    06-29-2009, 12:31 AM
    Answer
    • Star
      9,796 point Star
    • shashankgwl
    • Member since 09-19-2008, 3:18 PM
    • MUMBAI
    • Posts 1,929

    is there any click handler defined on them??

    LinkButton.Click+=new EventHandler(Linkbutton_Click);

    SHASHANK BHIDE
    CAPGEMINI INDIA
    "THE ROAD TO SUCCESS IS ALWAYS UNDER CONSTRUCTION MARK MY RESPONSE AS ANSWER TO HELP ME BUILD IT Wink "
  • Re: Composite control links do not postback

    06-29-2009, 11:05 AM
    • Member
      17 point Member
    • phfle1
    • Member since 09-28-2007, 1:06 PM
    • Posts 79

    Hi,

    No there isn't but  it seems there is no property named click on the linkbutton.

    linkbutton.click does not existe, I only have onClientClick

    Any other idea?

    Thanks


  • Re: Composite control links do not postback

    06-29-2009, 11:19 AM
    • Member
      17 point Member
    • phfle1
    • Member since 09-28-2007, 1:06 PM
    • Posts 79

    Sorry, my fault. That was the answer.


    Thanks,


    Phil

Page 1 of 1 (4 items)