473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

N-Tier Object datasource and Gridview

I seem to be having a mental block for some reason.

Some goals:
A web form with fields
A web service that processes those fields
Send the fields as a single parameter to the web service
Use an object datasource to populate the form
Object datasources get values from properties in classes

How do I structure a class so that I can marshal data in a web app (from the
screen) and in a web service (from the database) while still allowing it to
be bound to a datagridview or formview and be sent as a marshalled unit
accross the wire? (i.e. I don't want to invoke the web service to set each
property)

Or do I just have to manually create tables and not use data binding?

What's comming to mind is using a class/structure with public members and
then writing code to move it in and out of another class with properties?
Ouch.
May 22 '06 #1
3 1746
Classic architectural design :

Let's say that you designed a typed DataSet : MyDataSet
You bind your Webform controls to an instance of MyDataSet (in fact
there's a middle object between controls and Data that is called
DataBind).

Your Webservice should have two methods :
FillDataSet(MyDataSet ds)
UpdateDataSet(MyDataSet ds)

Your ASP.NET application should call FillDataSet to obtain data, and
call UpdateDataSet to update data.

So the architecture is :

Web form <--Serialized DataSet--> Web service <--SQL--> Database

May 22 '06 #2
I found the following:

If I create a class that has properties in a web service and in another
class that has web methods, return the first class. My application when it
gets a reference to the webservice will also get a reference to the class (I
assume with no functionality). I can then send and retrieve this class and
getting/setting individual properties are not sent accross the wire.

Larry
May 22 '06 #3
You are talking about "serialization" of objects.
You can mark serializable properties with the metadata [Serializable].

May 22 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Greg | last post by:
I am running an RDLC with a object datasource. In the object I try to access System.Web.Httphandler to get the session, but it is nothing. The reportviewer running my rdlc from a webform, and it...
0
by: mimo | last post by:
Hello, This is a really easy asp.net 2.0 question that some how I am missing. How do I bind a label to a field in an object datasource control? Thanks!
2
by: newsgroup.poster | last post by:
Hello, I'm encounterring the following problem when I try to add object datasource to my C# project: - the wizzard form open - I choose object, then click on next - the next screen display...
0
by: Annie | last post by:
hello guys, I am using Object Datasource in my GUI and binding the GRID's data source to Object Datasource and everything is working ok. Pageing and sorting is working fine too ... However,...
0
by: Ravimama | last post by:
Hi All, I m binding my GridView with ObjectDataSource which does all operation with database according to command methods( in the data access layer) set. Now I want to add EditItemTemplate...
0
by: Adam Knight | last post by:
Hi All, I have a repeater control nested inside another repeater control. The nested (child) repeater control, is bound to an object data source. My problem is, i need to send a data item...
1
by: Chris | last post by:
I have a gridview bound to the select method of an object data source. I have a filter button, that when clicked applies a filter typed in a textbox. How do I change the select method of the object...
0
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have a gridview that binds to an object datasource. I added an update method to the object data source through the wizard. The update method takes an object as input and returns an object of...
0
by: mesut | last post by:
hi I'm using objectdatasource to get my data. it works fine. The currentway how it works. When the page opens it loads the gridview. but I don't want this. I would like to load the gridview...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.