Solved

DataBind method

Posted on 2016-08-06
5
48 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 63

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 63

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.NET(C#) Eliminating weekends from a date range 2 53
Input parameteres to DragOver 2 34
itextsharp with c# 3 18
Dictionary and array of [N] size - performance tuned 12 40
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.

713 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