How to embed invisible data in cells

Discussion in 'ASP .Net Datagrid Control' started by Olivier Matrot, Jul 21, 2005.

  1. Hello,

    I want to set invisible data into a cell control such as label. The goal is
    to retrieve this information in a postback. How can I do this ? What about a
    "viewstate" per row in a datagrid ??

    TIA.
    Olivier Matrot, Jul 21, 2005
    #1
    1. Advertising

  2. Html control <input type=hidden ..> is made specially for this. AKA
    HtmlInputHidden.

    Eliyahu

    "Olivier Matrot" <> wrote in message
    news:eT$...
    > Hello,
    >
    > I want to set invisible data into a cell control such as label. The goal

    is
    > to retrieve this information in a postback. How can I do this ? What about

    a
    > "viewstate" per row in a datagrid ??
    >
    > TIA.
    >
    >
    Eliyahu Goldin, Jul 21, 2005
    #2
    1. Advertising

  3. Hi Oliver,

    I think Eliyahu's suggestion on using the Html input hidden control is
    quite a good suggestion. In addition, if you've already put some webserver
    controls in the cells( of datagrid?). We can also use WebControl.Attributes
    colleciton to add some simple string datas which is also non-visible but
    can be retrieved at serverside across postback/client-server round trip.
    Please feel free to post here if you have anything unclear. Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    --------------------
    | From: "Eliyahu Goldin" <>
    | References: <eT$>
    | Subject: Re: How to embed invisible data in cells
    | Date: Thu, 21 Jul 2005 16:26:21 +0200
    | Lines: 20
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
    | Message-ID: <#>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    | NNTP-Posting-Host: 212.143.94.2
    | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
    | Xref: TK2MSFTNGXA01.phx.gbl
    microsoft.public.dotnet.framework.aspnet.datagridcontrol:5199
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    |
    | Html control <input type=hidden ..> is made specially for this. AKA
    | HtmlInputHidden.
    |
    | Eliyahu
    |
    | "Olivier Matrot" <> wrote in message
    | news:eT$...
    | > Hello,
    | >
    | > I want to set invisible data into a cell control such as label. The goal
    | is
    | > to retrieve this information in a postback. How can I do this ? What
    about
    | a
    | > "viewstate" per row in a datagrid ??
    | >
    | > TIA.
    | >
    | >
    |
    |
    |
    Steven Cheng[MSFT], Jul 22, 2005
    #3
  4. This is perfect.
    Thanks for that.

    "Steven Cheng[MSFT]" <> wrote in message
    news:...
    > Hi Oliver,
    >
    > I think Eliyahu's suggestion on using the Html input hidden control is
    > quite a good suggestion. In addition, if you've already put some webserver
    > controls in the cells( of datagrid?). We can also use
    > WebControl.Attributes
    > colleciton to add some simple string datas which is also non-visible but
    > can be retrieved at serverside across postback/client-server round trip.
    > Please feel free to post here if you have anything unclear. Thanks,
    >
    > Steven Cheng
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
    > --------------------
    > | From: "Eliyahu Goldin" <>
    > | References: <eT$>
    > | Subject: Re: How to embed invisible data in cells
    > | Date: Thu, 21 Jul 2005 16:26:21 +0200
    > | Lines: 20
    > | X-Priority: 3
    > | X-MSMail-Priority: Normal
    > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
    > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
    > | Message-ID: <#>
    > | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    > | NNTP-Posting-Host: 212.143.94.2
    > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
    > | Xref: TK2MSFTNGXA01.phx.gbl
    > microsoft.public.dotnet.framework.aspnet.datagridcontrol:5199
    > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    > |
    > | Html control <input type=hidden ..> is made specially for this. AKA
    > | HtmlInputHidden.
    > |
    > | Eliyahu
    > |
    > | "Olivier Matrot" <> wrote in message
    > | news:eT$...
    > | > Hello,
    > | >
    > | > I want to set invisible data into a cell control such as label. The
    > goal
    > | is
    > | > to retrieve this information in a postback. How can I do this ? What
    > about
    > | a
    > | > "viewstate" per row in a datagrid ??
    > | >
    > | > TIA.
    > | >
    > | >
    > |
    > |
    > |
    >
    Olivier Matrot, Jul 22, 2005
    #4
  5. You're welcome :)

    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    --------------------
    | From: "Olivier Matrot" <>
    | References: <eT$>
    <#>
    <>
    | Subject: Re: How to embed invisible data in cells
    | Date: Fri, 22 Jul 2005 14:51:51 +0200
    | Lines: 66
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    | X-RFC2646: Format=Flowed; Original
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    | Message-ID: <>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    | NNTP-Posting-Host: reverse.completel.net 213.30.138.178
    | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
    | Xref: TK2MSFTNGXA01.phx.gbl
    microsoft.public.dotnet.framework.aspnet.datagridcontrol:5211
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    |
    | This is perfect.
    | Thanks for that.
    |
    | "Steven Cheng[MSFT]" <> wrote in message
    | news:...
    | > Hi Oliver,
    | >
    | > I think Eliyahu's suggestion on using the Html input hidden control is
    | > quite a good suggestion. In addition, if you've already put some
    webserver
    | > controls in the cells( of datagrid?). We can also use
    | > WebControl.Attributes
    | > colleciton to add some simple string datas which is also non-visible but
    | > can be retrieved at serverside across postback/client-server round trip.
    | > Please feel free to post here if you have anything unclear. Thanks,
    | >
    | > Steven Cheng
    | > Microsoft Online Support
    | >
    | > Get Secure! www.microsoft.com/security
    | > (This posting is provided "AS IS", with no warranties, and confers no
    | > rights.)
    | >
    | > --------------------
    | > | From: "Eliyahu Goldin" <>
    | > | References: <eT$>
    | > | Subject: Re: How to embed invisible data in cells
    | > | Date: Thu, 21 Jul 2005 16:26:21 +0200
    | > | Lines: 20
    | > | X-Priority: 3
    | > | X-MSMail-Priority: Normal
    | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
    | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
    | > | Message-ID: <#>
    | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    | > | NNTP-Posting-Host: 212.143.94.2
    | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
    | > | Xref: TK2MSFTNGXA01.phx.gbl
    | > microsoft.public.dotnet.framework.aspnet.datagridcontrol:5199
    | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    | > |
    | > | Html control <input type=hidden ..> is made specially for this. AKA
    | > | HtmlInputHidden.
    | > |
    | > | Eliyahu
    | > |
    | > | "Olivier Matrot" <> wrote in message
    | > | news:eT$...
    | > | > Hello,
    | > | >
    | > | > I want to set invisible data into a cell control such as label. The
    | > goal
    | > | is
    | > | > to retrieve this information in a postback. How can I do this ? What
    | > about
    | > | a
    | > | > "viewstate" per row in a datagrid ??
    | > | >
    | > | > TIA.
    | > | >
    | > | >
    | > |
    | > |
    | > |
    | >
    |
    |
    |
    Steven Cheng[MSFT], Jul 25, 2005
    #5
    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. Replies:
    0
    Views:
    510
  2. Dot Net Daddy

    Invisible Cells in GridView

    Dot Net Daddy, Aug 15, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    400
    Mark Rae
    Aug 15, 2006
  3. Andy B
    Replies:
    5
    Views:
    573
    Andy B
    May 29, 2008
  4. JLeary

    Getting the value of invisible columns/cells

    JLeary, Jul 29, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    5
    Views:
    110
    Lewis Wang [MSFT]
    Jul 31, 2003
Loading...

Share This Page