• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 90
  • Last Modified:

DataBind method

How come sometimes you use DataBind method to bind data to a control and sometimes you don't?
0
Lawrence Avery
Asked:
Lawrence Avery
  • 2
  • 2
2 Solutions
 
AndyAinscowFreelance programmer / ConsultantCommented:
Because some times it makes sense to bind to a data source and sometimes you want to supply the contents without automatic linking between the control and the data source.

Use the suitable tool for the job.  You can put a screw into a wall with a hammer but it usually doesn't make sense to do it that way does it?
0
 
Fernando SotoRetiredCommented:
From Microsoft documentation
Use this method to bind data from a source to a server control. This method is commonly used after retrieving a dataset through a database query. Most controls perform data binding automatically, which means that you typically do not need to call this method explicitly.
0
 
Lawrence AverySystem DeveloperAuthor Commented:
Good answers
0
 
Fernando SotoRetiredCommented:
Hi metro156, if one or both solutions answered your question please close the question.

Thanks.
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
Seems to be what the author wanted to do.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now