place holder

Discussion in 'ASP .Net' started by Karl Seguin, Sep 23, 2004.

  1. Karl Seguin

    Karl Seguin Guest

    The checkboxes need to be re-added when the 2nd button is clicked.
    VIewstate only saves values, it doesn't save actual controls. Since you are
    adding them dynamically the first time, you need to subsequently dynamically
    add them. There's a free 3rd party control out there that does this for
    you...for the life of me i can't remember or find it right now, but I think
    I have a link at home...

    Alternatively you could use Request.Form.

    Karl


    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "http://www.visual-basic-data-mining.net/forum" <> wrote
    in message news:%...
    > Hi
    >
    > I have problem with placeholder.When user click on "retrive" button I am
    > creating the checkboxes and adding them to placeholder .And these are
    > displaying perfectly in my web page.
    > now user may update the checkboxes ocording to their wish.
    >
    > when try to get whether checkbox is checked or not in another button(say
    > update) click its not working. i mean below code
    >
    > For Each item In plh.Controls
    >
    > If (TypeOf (item) Is System.Web.UI.WebControls.CheckBox) Then
    >
    > Dim checkbox1 As System.Web.UI.WebControls.CheckBox = CType(item,
    > System.Web.UI.WebControls.CheckBox)
    >
    > If checkbox1.Checked Then
    > Response.Write("This has been checked!")
    > Else
    > 'Response.Write("This is not checked! ")
    > End If
    >
    > End If
    >
    >
    > Next
    >
    >
    > if i copy this code in "retrive" button click its working but i need to

    get
    > the checkbox value or checked or not in "update" button click.placeholder
    > control does not contain anything if controle reaches the update button
    > clicked event.
    >
    > pl advice me thanks
    >
    >
    > --
    > msrnivas - forum member
    > http://www.visual-basic-data-mining.net/forum
    >
    >
     
    Karl Seguin, Sep 23, 2004
    #1
    1. Advertising

  2. Hi

    I have problem with placeholder.When user click on "retrive" button I am
    creating the checkboxes and adding them to placeholder .And these are
    displaying perfectly in my web page.
    now user may update the checkboxes ocording to their wish.

    when try to get whether checkbox is checked or not in another button(say
    update) click its not working. i mean below code

    For Each item In plh.Controls

    If (TypeOf (item) Is System.Web.UI.WebControls.CheckBox) Then

    Dim checkbox1 As System.Web.UI.WebControls.CheckBox = CType(item,
    System.Web.UI.WebControls.CheckBox)

    If checkbox1.Checked Then
    Response.Write("This has been checked!")
    Else
    'Response.Write("This is not checked! ")
    End If

    End If


    Next


    if i copy this code in "retrive" button click its working but i need to get
    the checkbox value or checked or not in "update" button click.placeholder
    control does not contain anything if controle reaches the update button
    clicked event.

    pl advice me thanks


    --
    msrnivas - forum member
    http://www.visual-basic-data-mining.net/forum
     
    http://www.visual-basic-data-mining.net/forum, Sep 23, 2004
    #2
    1. Advertising

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. suzy

    place holder / xslt table

    suzy, Jul 14, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    427
  2. Elizabeth Harmon

    Finding Controls in a Place Holder

    Elizabeth Harmon, Nov 13, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    397
    George Paiva
    Nov 13, 2003
  3. JAPHET

    How to align Place Holder

    JAPHET, Sep 23, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    563
    Karl Seguin
    Sep 23, 2004
  4. Replies:
    3
    Views:
    2,928
    Bruce Barker
    Sep 8, 2005
  5. Replies:
    5
    Views:
    15,099
    =?Utf-8?B?TmVlZFRvS25vdw==?=
    Nov 19, 2005
Loading...

Share This Page