473,406 Members | 2,956 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,406 software developers and data experts.

Does anyone like what Microsoft has done to databinding?

When I first built a few web pages in ASP .Net 2.0, I thought it was great.
The formview and detailview contorls would automatically layout the controls
for you, the update methods were automatically generated, and the
objectdatasource let you design against a business object through the gui.

Now I am working on my first real web application on 2.0, and I find this
automatic functionality doesn't do much beyond allowing me to generate pages
to update my reference data. And since none of the previous databinding
methodology was left intact, I am having to spend twice as much time working
around the built in code as I previously spent working with the 1.1
databinding.

You now have to bind most controls inside of a formview or details view.
You can't access the underlying object in the objectdatasource (although you
can override the construction of this object), so it is difficult to
interject any specific formating into your interface (like databinding to a
date that might be null, you could previously bind to a method or check the
null method in your binding). These problems can be worked around through
business objects, but this forces you to do formating in these classes
instead of in the interface.

The update methodology seems like a good idea in the formview until you have
a requirement to update multiple tables in a dataset through the same method.
You can only bind the formview to one datamember, and the formviews will
each try to call their update methods separately. The only workaround I have
found is to retrieve the control values yourself (through the findcontrol
method since you no longer have direct access to these from your class) and
to call the update method yourself. This is how I might have done it in 1.1,
but since I have to use the findcontrol method to retrieve the values you no
longer get the benefits of intellisence when writing this code.

It seems like in the pursuit of "creating web sites without code" Microsoft
has removed the abiltiy to actually put code into your web sites.

Has anyone else been running into these or similar issues?
Nov 19 '05 #1
3 1840
Okay, I just figured out how to access the data object, and you have to do it
through the formview or detailview instead of through the objectdatasource.
"John Bailey" wrote:
When I first built a few web pages in ASP .Net 2.0, I thought it was great.
The formview and detailview contorls would automatically layout the controls
for you, the update methods were automatically generated, and the
objectdatasource let you design against a business object through the gui.

Now I am working on my first real web application on 2.0, and I find this
automatic functionality doesn't do much beyond allowing me to generate pages
to update my reference data. And since none of the previous databinding
methodology was left intact, I am having to spend twice as much time working
around the built in code as I previously spent working with the 1.1
databinding.

You now have to bind most controls inside of a formview or details view.
You can't access the underlying object in the objectdatasource (although you
can override the construction of this object), so it is difficult to
interject any specific formating into your interface (like databinding to a
date that might be null, you could previously bind to a method or check the
null method in your binding). These problems can be worked around through
business objects, but this forces you to do formating in these classes
instead of in the interface.

The update methodology seems like a good idea in the formview until you have
a requirement to update multiple tables in a dataset through the same method.
You can only bind the formview to one datamember, and the formviews will
each try to call their update methods separately. The only workaround I have
found is to retrieve the control values yourself (through the findcontrol
method since you no longer have direct access to these from your class) and
to call the update method yourself. This is how I might have done it in 1.1,
but since I have to use the findcontrol method to retrieve the values you no
longer get the benefits of intellisence when writing this code.

It seems like in the pursuit of "creating web sites without code" Microsoft
has removed the abiltiy to actually put code into your web sites.

Has anyone else been running into these or similar issues?

Nov 19 '05 #2
John I agree, it's not very well thought out and doesn't really work very
well with Typed Datasets, which you might imagine would be a rather common
use of the ObjectDatasource. Anyway,can you tell me how you get to the data
object from a detailview?
"John Bailey" wrote:
Okay, I just figured out how to access the data object, and you have to do it
through the formview or detailview instead of through the objectdatasource.
"John Bailey" wrote:
When I first built a few web pages in ASP .Net 2.0, I thought it was great.
The formview and detailview contorls would automatically layout the controls
for you, the update methods were automatically generated, and the
objectdatasource let you design against a business object through the gui.

Now I am working on my first real web application on 2.0, and I find this
automatic functionality doesn't do much beyond allowing me to generate pages
to update my reference data. And since none of the previous databinding
methodology was left intact, I am having to spend twice as much time working
around the built in code as I previously spent working with the 1.1
databinding.

You now have to bind most controls inside of a formview or details view.
You can't access the underlying object in the objectdatasource (although you
can override the construction of this object), so it is difficult to
interject any specific formating into your interface (like databinding to a
date that might be null, you could previously bind to a method or check the
null method in your binding). These problems can be worked around through
business objects, but this forces you to do formating in these classes
instead of in the interface.

The update methodology seems like a good idea in the formview until you have
a requirement to update multiple tables in a dataset through the same method.
You can only bind the formview to one datamember, and the formviews will
each try to call their update methods separately. The only workaround I have
found is to retrieve the control values yourself (through the findcontrol
method since you no longer have direct access to these from your class) and
to call the update method yourself. This is how I might have done it in 1.1,
but since I have to use the findcontrol method to retrieve the values you no
longer get the benefits of intellisence when writing this code.

It seems like in the pursuit of "creating web sites without code" Microsoft
has removed the abiltiy to actually put code into your web sites.

Has anyone else been running into these or similar issues?

Nov 19 '05 #3
It seems almost too obvious, but in the Databind method, the DataItem
property of either the FormView or DetailView can be cast to the correct
underlying type. At any time during the databinding, you can cast this (such
as if when you are using a custom function in your databinding).

This method of getting at the data doesn't seem overly well documented.

"Mike Salway" wrote:
John I agree, it's not very well thought out and doesn't really work very
well with Typed Datasets, which you might imagine would be a rather common
use of the ObjectDatasource. Anyway,can you tell me how you get to the data
object from a detailview?
"John Bailey" wrote:
Okay, I just figured out how to access the data object, and you have to do it
through the formview or detailview instead of through the objectdatasource.
"John Bailey" wrote:
When I first built a few web pages in ASP .Net 2.0, I thought it was great.
The formview and detailview contorls would automatically layout the controls
for you, the update methods were automatically generated, and the
objectdatasource let you design against a business object through the gui.

Now I am working on my first real web application on 2.0, and I find this
automatic functionality doesn't do much beyond allowing me to generate pages
to update my reference data. And since none of the previous databinding
methodology was left intact, I am having to spend twice as much time working
around the built in code as I previously spent working with the 1.1
databinding.

You now have to bind most controls inside of a formview or details view.
You can't access the underlying object in the objectdatasource (although you
can override the construction of this object), so it is difficult to
interject any specific formating into your interface (like databinding to a
date that might be null, you could previously bind to a method or check the
null method in your binding). These problems can be worked around through
business objects, but this forces you to do formating in these classes
instead of in the interface.

The update methodology seems like a good idea in the formview until you have
a requirement to update multiple tables in a dataset through the same method.
You can only bind the formview to one datamember, and the formviews will
each try to call their update methods separately. The only workaround I have
found is to retrieve the control values yourself (through the findcontrol
method since you no longer have direct access to these from your class) and
to call the update method yourself. This is how I might have done it in 1.1,
but since I have to use the findcontrol method to retrieve the values you no
longer get the benefits of intellisence when writing this code.

It seems like in the pursuit of "creating web sites without code" Microsoft
has removed the abiltiy to actually put code into your web sites.

Has anyone else been running into these or similar issues?

Nov 19 '05 #4

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

Similar topics

1
by: Patrick Demets | last post by:
I have a fairly simple form with databound text boxes, but changes (or new records) are not recognized. The text boxes are successfully populated with data (from the database) and I can cycle...
0
by: Thomas | last post by:
I have a dropdownlist whose items are bind to it during runtime. I do it in the databinding event, but the event handler was never get called. Finally I have to do the databinding in the prerender...
2
by: Shane | last post by:
When I click on the DataBinding in the properties window a list of options open up called Advanced,Tag and Text. I would like to know what Tag and Text are set to? I hope to Bind a text box to a...
3
by: Tim Baur | last post by:
I'm a VB6 developer who's just beginning to make the move to .Net 2005, and I'm wondering if data binding is worth the effort. After a lot of fighting with it in VB6, I finally realized the best...
14
by: Anoop | last post by:
Hi, I am new to this newsgroup and need help in the following questions. 1. I am workin' on a GUI application. Does C# provides Layout Managers the way Java does to design GUI? I know that it...
15
by: Pucca | last post by:
I'm getting an error when I tried to use this BerConverter class in my C# code. Even though the Interent doc says that it runs on Win2000 sp4, I just thgouth I'll double check. Does anyone know...
2
by: cjard | last post by:
I ask, because I have a textbox bound to a bindingsource, which is bound to a datatable(row) The datatable is typed, and hence exports a Property called Column1 I added another property to the...
6
by: Dmitry Duginov | last post by:
Hi, I have the following label markup (label is inside FormView): <asp:Label ID="lblIndicatorReady" runat="server" Text="RE" ToolTip="Ready" BackColor='<%#...
6
by: Jonathan Wood | last post by:
I have a databound dropdownlist control. Based on some other criteria, I need to specify the selected item in my pages Load event. The problem is that, in my load event, the control does not yet...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.