What is Page.DataBind doing? For what is this useful?

Discussion in 'ASP .Net' started by Andreas Klemt, Jan 14, 2004.

  1. Hello,
    for what is Page.DataBind useful and what is it doing?

    Thanks for any answer!
    Andreas
     
    Andreas Klemt, Jan 14, 2004
    #1
    1. Advertising

  2. The methodology in ADO was to loop through data and write it out to the
    stream. In ADO.NET, you bind data instead of looping. Both Windows Forms and
    ASP.NET have data aware controls that can be bound to. For each control that
    can be bound to, there is a DataBind method. For example, a DataGrid:

    DataGrid1.DataSource = MyDataSet.Table["MyTable"].DefaultView;
    DataGrid1.DataBind();

    If you have a lot of controls, rather than bind each individually, you can
    use Page.DataBind(). This tells the rendering engine to find all controls
    with a DataSource and bind them.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    **********************************************************************
    Think Outside the Box!
    **********************************************************************
    "Andreas Klemt" <> wrote in message
    news:...
    > Hello,
    > for what is Page.DataBind useful and what is it doing?
    >
    > Thanks for any answer!
    > Andreas
    >
    >
     
    Cowboy \(Gregory A. Beamer\), Jan 14, 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. =?Utf-8?B?SmltIEhlYXZleQ==?=

    Page.DataBind()

    =?Utf-8?B?SmltIEhlYXZleQ==?=, May 1, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,007
    Joe Fallon
    May 3, 2004
  2. Martin
    Replies:
    1
    Views:
    434
    =?Utf-8?B?RGVtZXRyaQ==?=
    Sep 22, 2004
  3. Olav Tollefsen
    Replies:
    2
    Views:
    1,894
    Olav Tollefsen
    Dec 29, 2004
  4. Page.DataBind()

    , Sep 1, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    746
  5. Michael
    Replies:
    0
    Views:
    227
    Michael
    Dec 29, 2003
Loading...

Share This Page