When/Why to use Page.Bind

A

Anand Sagar

The DataBind I understand is useful for binding data from datasources to
WebControls like dropdownlist, datagrid etc. usually during the Page_Load or
Page_Init

In what cases will anyone use a Page.DataBind ?

Thanks,
Anand Sagar
 
R

Raterus

I see it as as a convenience when I don't want to issue a control.databind for each of my controls. I assign all the datasources then call Page.DataBind which binds everything in one command. I'd be careful with this command though, if you have controls which are already bound, this will rebind them, which can slow down your page unnecessarily.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,182
Latest member
BettinaPol

Latest Threads

Top