Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > What is Page.DataBind doing? For what is this useful?

Reply
Thread Tools

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

 
 
Andreas Klemt
Guest
Posts: n/a
 
      01-14-2004
Hello,
for what is Page.DataBind useful and what is it doing?

Thanks for any answer!
Andreas


 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      01-14-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
> for what is Page.DataBind useful and what is it doing?
>
> Thanks for any answer!
> Andreas
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments