Solved

DataBind method

Posted on 2016-08-06
5
34 Views
Last Modified: 2016-09-02
How come sometimes you use DataBind method to bind data to a control and sometimes you don't?
0
Comment
Question by:metro156
  • 2
  • 2
5 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 250 total points (awarded by participants)
ID: 41745626
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
 
LVL 62

Assisted Solution

by:Fernando Soto
Fernando Soto earned 250 total points (awarded by participants)
ID: 41745721
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
 

Author Comment

by:metro156
ID: 41755563
Good answers
0
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 41755906
Hi metro156, if one or both solutions answered your question please close the question.

Thanks.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 41781299
Seems to be what the author wanted to do.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now