dynamic create controls in placeholder problem

Last post 07-12-2006 4:30 AM by showmethemoney. 0 replies.

Sort Posts:

  • dynamic create controls in placeholder problem

    07-12-2006, 4:30 AM
    • Member
      5 point Member
    • showmethemoney
    • Member since 07-12-2006, 3:41 AM
    • Seoul
    • Posts 1

    hi all

    dynamic create controls in placeholder problem

     

    I wanna represent datalist paging

    below is architect

     

    <asp:updatepanel>

          <asp:datalist>

          </asp:datalist>

     

          <asp:placeholder>

             //here are dynamic created <asp:LinkButton>s like this

             <prev    1 2 3 4 5 6 7 8 9 10   next>

     

          </asp:placeholder>

    </asp:updatepanel>

     

    I wanna represent datalist paging  with dynamically create  controls

    <prev    1 2 3 4 5 6 7 8 9 10   next>

    by postBack event in atlas update panel

     

    I create paging controls

    void Page_Inite(){

     myPlaceHoder.Controls.Add(new myLinkButton) s

    }

     

    when LinkButton click event

    myPlaceHoder.Clear()

    and remake paging controls

     

    when click   next> button

     

    It represent  

    <prev    11  12  13  14  15  16  17  18  19 20   next>

      right?

     

    It works great

    but

    When I clicked   one of 11 ~ 20   button 

    It reload to

    <prev    1 2 3 4 5 6 7 8 9 10   next>

    I can`t make sense.

     

    I removed  prev created controls by 'myPlaceHoder.Clear()'

    and remade  11 to 20 buttons

    but 11 to 20 buttons does not work

     

    I can using dynamic created HTML, and javascript

    but I want using postback event  atlas updatepanel

     

    I guess it `s  viewstate problem

    but I don`t know solution

     

    do you have any idea?

    please help me

     

     

    God's in his heaven-
    All's right with the world.
Page 1 of 1 (1 items)