Custom Datasource Controls Vs. Object Datasource Controls - which one to use

Hi folks,

I am a web developer developing pages in the project. I need to integrate the front end pages with the backend API. Active directory is being used as the database system for our project. I only use the API and the methods offered by it to interact with the data.

For all the operations on the data, I have methods that I can call from the API (viz. Create(), Delete(), Modify() etc.). For connecting the data to my frontend data controls (viz. GridView, DropDownList etc.) I can use Object Datasource Control. I also read some articles about Custom Datasource controls. Now, I am having a doubt which one is efficient and in what way. Can anyone clarify this doubt for me? It would be very helpful.

 Thanks,


 


Charan
0
charan
5/2/2007 6:48:48 PM
asp.net.object-datasource 16182 articles. 0 followers. Follow

1 Replies
998 Views

Similar Articles

[PageSpeed] 7

Hi,

Since you have a class that has methods to create, delete and update the database, you can just use ObjectDataSource. Configure it to do insert/update/delete.

As far as I know, there is no CustomDataSource in ASP.NET. Using ObjectDataSource is the most convenient way when you have a class already defined for data accessing.

HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!


Sincerely,
Kevin Yu
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Mark as Not Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
0
Kevin
5/4/2007 8:04:00 AM
Reply:

Similar Artilces:

Object Datasource and Custom Object
Hey, I have an object datasource that populates a detailsview.  I know how to update the changes using a BLL method like so: public static UpdateUser(string Username, string Surname); However I would like to use the objects update() method ive created that essentially calls: public static UpdateUser(User user); The question is, how do I access the fields that are contained within the details view?  im guessing .FindControl() but i dont have the ID.  the other way I suppose is to itterate through all the controls within in it?  there must be a better way though? The ...

Using DataSource Controls Vs Creating Custom Classes
Hi, I just want to get your opinion on programming I never use the build in DataSource Controls I create a class and get my dataset, datatables ... Should I used the built in controls or is it okay to continue to use classes. ThanksJulio D....

code for Custom paging without using sqldatasource control and sql datasource control for gridview...........
 code for Custom paging without using sqldatasource control and sql datasource control for gridview...........i need code for how to show all pagenumbers in gridview with custom paging in gridview..............It is very urgent................................. T.Ashok Kumar  suppose that we have a table like thisCountryId  identity intCountryTitle    nvarchar(50)you can use this sql command for paging the dataUSE [CyberOffice]GO/****** Object:  StoredProcedure [dbo].[CountryGetListPaged]    Script Date: 09/17/2008 14:01:06 ******/SET A...

Problem Converting Event Calendar Control from SqlDataSource to Custom Binding / Object DataSource
Hi !!Does anyone knows whats wrong? I am trying to convert thsi 2 tier app into 3 tier, and expanding it for one of our client. In the Events_Calendar page, I see SqlDataSource for ec:EventCalendar.We are trying to bind data to eventsCalendar in PageLoad. It gives us an error. Reason for the error is the "DayField" in events calendar. Its not DataBoud. Can anyone tell me what is that for? How it can be fixed?Thanks Did anyone used Events Calander DLL from Club Starter Kit? No one came across this problem? Here is the error message I have ............ System.NullReferenceException: Objec...

Gridview Search Without Object Datasource Filter ParametersGridview Search Without Object Datasource Filter Parameters
Couple weeks ago I read a article about highlighted search in Gridview  (http://blog.evonet.com.au/post/2008/06/25/Gridview-with-highlighted-search-results.aspx) and in my project I used things I learned but now things changed I have a gridview and in code I give its datasource so because I dont use any objectdatasource I dont know where to write my filtering parameters. Is there anyway to use filtering without objectdatasource, or is there a way to give objectdatasource an source then bind it to my gridview. My code:  //No objectdatasource how can I conduct a search?GridView1.Da...

How do i pass an ID value from one datasource to another datasource located inside a repeater control?
Hello,  I am trying to develop a page that allows me to update stages for each item that does not have a status of complete.  I am going to break out what i am trying to do in 4 sections (hopefully to explain this as best as i can), why, what, goal, and problem. Why am i trying to do this? Every day we recieve media in the mail, and we have to put it online.  There are 5 stages we must pass to get this media online, Received, Importing, Compressing, Uploading, and Complete.  I am trying to create a page that will help our media loaders easily keep track of th...

How to access page property (or just controls in it) from a custom DataSource control
Hi, I am currently working on a number of various custom datasource controls. I've found the solution for most problems on the way so far, but now I really got stuck. One of my controls will take a set of various input parameters, similar to the good old SQLDataSource control. One of my parameter classes is supposed to take a value from an arbitrary control on the page. Howevere, it does not seem to be an easy way to access the Page property (from inside this control) on my DataSource control. I need this to use FindControl. When I do so, from inside my "Externa...

How to modify a select paramater of an object datasource control?
Right now I'm accomplishing this by simply modifying the 'DefaultValue' property in my codebehind.  Is there a better approach?Thanks - Wayde  There are several ways. One way is exactly what you said. Another way is to handle the ObjectDataSource's Selecting event and change the parameters in the InputParameters dictionary that's passed in.Thanks,EilonBlog: http://weblogs.asp.net/LeftSlipper/...

5 datasource using one gridview control
Hi: I have a dropdown list, according to user select different item value, such as: male, female, country... then showing the gridview. At the moment, I have 5 gridviews (all have same coloums and format from one table) to show the result (infact using hide and show panels), I feel that is not good way, too many gridviews! I am think using one gridview to show the result according to which item is selected. I feel hard to handle this because it needs binding the datasauce dynamically. How to set the DataSourceID dynamically? it can save a lot of lines of auto generated code...

I could not connect to a datasource object via Accordion control
I am using Atlas Control Toolkit and I try to connect my Accordion control to a ObjectDataSource control. I read Atlas Toolkit user manual. It says we can use DataSource and DataSourceID properties for connect to datasource but I could not :(My codes is below:<atlasToolkit:Accordion BackColor="Gray" ID="acc_1" runat="server" HeaderCssClass="baslik" ContentCssClass="icerik" AutoSize="Limit" DataSourceID="ObjectDataSource1" DataSource="ObjectDataSource1.DataBind()">I also tried to declare DataSource="Obj...

create DataBoundControl control using more then one datasource
Hi, I am writing asp.net user control and I need to bind it with two different datasources. The control imlement DataBoundControl and I don't know how do I indicate between the two datasources in the perform select method (for example)?Naor  Hi Naor, can you please give us more information about what controls you have in the user control and why you need data from two datasources.Are you creating a control which should display records from two tables such as a master-detail relationship?   Please remember to click "Mark as Answer" on this post if it help...

trouble linking A menu control using sitemap datasource to MultiView Control?
Having trouble linking A menu control using sitemap datasourceto MultiView and View Web Server Controls   I need CustMultview( the multiview control) to use method SetActiveViewto get ViewID called from Menucontrol using selected menuitem Title or NavigateUrl I know I need to add // if (!IsPostBack)// { I want  (e.Item.text) to equal View view  so I can utilize // CustMultview.SetActiveView(view) // to set the View ID or should  I use // protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)// {// MultiView1.Act...

Controls bound to Datasource
I have a problem, and understand why it is happening but not the best way to fix it.    I have SQLDatasource control with a parameter in its WHERE statement (WHERE ID = @ID).  The parameter's source is a session variable.  Control values on the page are bound to this SQLDatasource during the page load event.  I then have a couple of buttons on the page that change the Session("ID") value in thier click event handler.  When I click a button the page reloads, and while reloading the new Session value is assigned at some point...

DropDownList DataBinding to an object datasource but with itemlist from XML DataSource???
Hi,Im trying to get a solution to the following problem:I've got a number of DDL (DropDownList) controls on my page and I want each control to have an option range of -9 to 9.  However I also want the SelectedValue to be data bound to an object datasource control.I was initially populating the DDL item list with a recursive routine which added the itemlist to DDL controls on the page and then programmatically set the selected value of each control from an object instance.  To update the database I was applying the DDL selected values into the update method parameters of my obje...

Web resources about - Custom Datasource Controls Vs. Object Datasource Controls - which one to use - asp.net.object-datasource

Datasource - Wikipedia, the free encyclopedia
A DataSource object has properties that can be modified when necessary. For example, if the data source is moved to a different server, the property ...

Inverness Graham Acquires DataSource
Inverness Graham , a lower middle market private equity firm headquartered in suburban Philadelphia, has acquired DataSource , a print supply ...

SmartGlance for iPad for iPad on the iTunes App Store
Read reviews, get customer ratings, see screenshots, and learn more about SmartGlance for iPad on the App Store. Download SmartGlance for iPad ...

Chaitanya Pandit (@chaitanyapandit) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Data source - Wikipedia, the free encyclopedia
... Data source A data source is any of the following types of sources for (mostly) digitized data: a database in the Java software platform, datasource ...

2ndQuadrant - PostgreSQL expertise from specialists with a source code level understanding of RDBMS ...
PostgreSQL expertise from specialists with a source code level understanding of RDBMS PostgreSQL Planets Gabriele’s PlanetPostgreSQL Gianni’s ...

Tagged entries for CLOUD COMPUTING
Alan Williamson's output as a Java Champion, Blog-City Architect, BlueDragon Creator, Author, Speaker and Internet Guru

Private equity deals
... of biometric identity management systems, applications and services. www.crossmatch.com Inverness Graham Investment has acquired DataSource ...

C# C Sharp and Tutorials on C# Friends.com
Learn the c# langauge to build web applications using our online tutorials with live demos. Participate in our forums and learn from others. ...

JavaScript UI Library, Ajax Components & HTML5 Framework - DHTMLX
DHTMLX offers a rich JavaScript library, UI components & HTML5 mobile framework. Build impressive web apps for both desktop and mobile devices. ...

Resources last updated: 1/17/2016 11:36:43 PM