473,396 Members | 1,838 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,396 software developers and data experts.

Presentation

I have done my first big project with .net 2.0. I like how easy it is to
build 3 tier apps with strongly typed datasets and a business logic layer.
The main thing I dislike is how to handle presentation logic:

The formview: is there any way of getting around having separate forms for
the insert and update as often they are identical.
I like databinding but dislike the formview type controls, is there anyway
to databind to textboxes from a business object with out a formview or
gridview.
What are people's opinions on the formview. Once you start nesting controls
and needing to apply presentation logic the events are a pain and you can't
access them for instance in the page load event
You end up with code all over the place to handle the inserts and updates.
I want to learn more about design patterns e.g. MVC/MVP is the formview
appropriate with these patterns

I am tempted just to use a panel and do the binding manually, it seems less
hassle. What is the best approach?

Regards, Chris.

Nov 23 '07 #1
2 1245
If you are doing 2.0, I believe you can do DataBindings, AND handle nulls.

If you're in 1.1, you may have some obstacles.

Google this:
http://www.google.com/search?hl=en&q...new+Binding%22

DataBindings "new Binding"

One link you'll find:
http://msdn2.microsoft.com/En-US/lib...abindings.aspx

That'll get your started on "individual objects" and binding.
The issue comes with you have to bind to a value that's not populated.
That's where a "new" vs "edit" will show up, and 2.0 has better handling for
that.

Unforunately, I don't have the exact info with me....but that'll get you
started.


"Fresno Bob" <no****@nospam.comwrote in message
news:OD**************@TK2MSFTNGP04.phx.gbl...
>I have done my first big project with .net 2.0. I like how easy it is to
build 3 tier apps with strongly typed datasets and a business logic layer.
The main thing I dislike is how to handle presentation logic:

The formview: is there any way of getting around having separate forms for
the insert and update as often they are identical.
I like databinding but dislike the formview type controls, is there anyway
to databind to textboxes from a business object with out a formview or
gridview.
What are people's opinions on the formview. Once you start nesting
controls and needing to apply presentation logic the events are a pain and
you can't access them for instance in the page load event
You end up with code all over the place to handle the inserts and updates.
I want to learn more about design patterns e.g. MVC/MVP is the formview
appropriate with these patterns

I am tempted just to use a panel and do the binding manually, it seems
less hassle. What is the best approach?

Regards, Chris.

Nov 23 '07 #2
The best way to deal with the FormView is to use an ObjectDataSource
(ODS). In the GetDataById(id) method you can pass in a -1 for "new
record" and have the GetDataById(id) method create a "new pseudo record"
for you. (ie, it won't exist in the database, but the FormView will
think it does) Then in the "Update" method, you check the ID for -1 and
do an insert if it is -1, otherwise you do an update.

That takes care of about 80% of any real problems I've had. Nesting
controls using user controls is a problem since you can't bind to them
but I honestly haven't had to do that too often and if I have it's been
for controls that are bound to a separate ODS anyhow. So, all I need to
do is pass the parent ID to the user control and let the ods in that
control do whatever work needs to be done.

-----Original Message-----
From: Fresno Bob [mailto:no****@nospam.com]
Posted At: Thursday, November 22, 2007 7:04 PM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Presentation
Subject: Presentation

I have done my first big project with .net 2.0. I like how easy it is to

build 3 tier apps with strongly typed datasets and a business logic
layer.
The main thing I dislike is how to handle presentation logic:

The formview: is there any way of getting around having separate forms
for
the insert and update as often they are identical.
I like databinding but dislike the formview type controls, is there
anyway
to databind to textboxes from a business object with out a formview or
gridview.
What are people's opinions on the formview. Once you start nesting
controls
and needing to apply presentation logic the events are a pain and you
can't
access them for instance in the page load event
You end up with code all over the place to handle the inserts and
updates.
I want to learn more about design patterns e.g. MVC/MVP is the formview
appropriate with these patterns

I am tempted just to use a panel and do the binding manually, it seems
less
hassle. What is the best approach?

Regards, Chris.

Nov 23 '07 #3

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

Similar topics

3
by: Mike C. Fletcher | last post by:
Slides from my PyGTA presentation on Tuesday, focusing mostly on why/where you would want to use meta-classes, are available in PDF format: ...
4
by: Joseph | last post by:
I am trying to open a 3 powerpoint presentation simultaneously afte each other without interruption, the operator of the application doe not need to notice anything or interfere in the operation of...
4
by: daD | last post by:
I am using an access front-end to open a MS P{werpoint presentation. My problem is that when I am finished with the presentation and use the "back" button on the toolbar to return to MS Access, MS...
1
by: rbg | last post by:
Hi, I am trying to understand the layering concept with the ASP.NET 2.0 apps. I have a ASP.NET 2.0 Web app which has 3 layers Presentation layer which contains UI elements and Input...
2
by: nguyen1105 | last post by:
Hello, It seems that the .Net Framework 3.0 Microsoft Presentation Foundation has no UI DataGrid control. I've verified the package System.Windows.Controls in the .Net Framework 3.0 Microsoft...
2
by: vernstalker | last post by:
hi all im new with flash...and i need to create a presentation using flash. So in my presentation i need an interval for each slide for aprox. 5 seconds. i use this actionscript ..it work on the...
1
by: =?Utf-8?B?d2lsbG5wb2s=?= | last post by:
Hello everyone. I have a PowerPoint Presentation that is 218 slides that includes animated gifs and sounds and everything. Currently they are online where the user will have to download the files...
0
by: sambrena | last post by:
Still rush about cities to take part in a conference? Although you know that travelling around the world for business meetings is a good way to meet and know your business partners, you have to...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
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.