473,701 Members | 2,882 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
objectdatasourc e 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 objectdatasourc e (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 1857
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 objectdatasourc e.
"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
objectdatasourc e 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 objectdatasourc e (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 ObjectDatasourc e. 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 objectdatasourc e.
"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
objectdatasourc e 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 objectdatasourc e (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 ObjectDatasourc e. 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 objectdatasourc e.
"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
objectdatasourc e 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 objectdatasourc e (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
9538
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 through all the records. Using a datagrid works fine for updating. I've based this on the first sample project from the book "C# Professional Projects" (Premier Press). I've read many posts concerning this (and the MS KB as well), and most seem...
0
1204
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 event. Has anyone had a similar problem? Thanks,
2
1759
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 Access database in my program. -- I am a Noob! Thanks for the Help :)
3
1176
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 practice was to leave it alone. It always caused more problems then it solved. I'm guessing that many of the issues are addressed in VB 2005, but I'm still hesitant to begin employing it. Any thoughts? This question is more of a opinion /...
14
4850
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 can be done using the designer but I intentionally don't want to use that. The one reason is that you cannot change the code generated by the designer. The other could be that you have more free hand and control to design your GUI. 2....
15
2573
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 if BerConverter is supported for Win2000 server? http://msdn2.microsoft.com/en-us/library/system.directoryservices.protocols.berconverter.decode.aspx -- Thanks.
2
3264
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 datatable by editing the partial class, and Called it ColumnX - it simply returns "Hello World" all the time Then I tried to bind my textbox to it, editing the binding for .Text from xyzBindingSource - Column1
6
2902
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='<%# Eval("Ready").ToString()=="True"?System.Drawing.Color.FromName("#FFFF80"):System.Drawing.Color.White %>' Enabled='<%# Eval("Ready") %>'
6
1857
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 have any data. I've found I can call DataBind() on that control and then it works okay. However, this has me wondering where the control normally databinds, and if me doing it manually would actually introduce the overhead of having the control...
0
8738
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8649
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9233
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9085
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7829
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6575
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4411
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3104
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2399
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.