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

FormView bound to Custom Class with Object DataSource

I am currently writing a screen in my application which uses a form view
control bound to an ObjectDataSource, the Business Layer is using a
custom class to overcome passing mutiple parameters to the business
layer however when the control in the FormView is a DropDownList it
seems the values are not passed through in the Update Method, either in
the updated copy of the class or the original copy, has anyone else came
accross this problem.

Any help is appreciated

Stuart

*** Sent via Developersdex http://www.developersdex.com ***
Apr 3 '06 #1
1 2309
Put a BIND statement on the dropdownlist's SelectedValue property, e.g.

asp:DropDownList ID="ddlCountry" runat="server" DataSourceID="odsCountries"
AutoPostBack="True"
SelectedValue='<%# Bind("Country") %>'>
</asp:DropDownList>

http://www.webswapp.com/codesamples/...s/default.aspx

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Stuart Ferguson" wrote:
I am currently writing a screen in my application which uses a form view
control bound to an ObjectDataSource, the Business Layer is using a
custom class to overcome passing mutiple parameters to the business
layer however when the control in the FormView is a DropDownList it
seems the values are not passed through in the Update Method, either in
the updated copy of the class or the original copy, has anyone else came
accross this problem.

Any help is appreciated

Stuart

*** Sent via Developersdex http://www.developersdex.com ***

Apr 3 '06 #2

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

Similar topics

3
by: sck10 | last post by:
Hello, I am creating a form for users to enter information about a lab and the members of the lab. I have one form (FormView) that they use to enter information about that lab. The keyvalue is...
2
by: P. Yanzick | last post by:
Hello, I am creating an edit template for a FormView control, changing one of the textboxes to a dropdown box. The dropdown will be populated from a simple table with the primary key, and a...
3
by: Bas Paap | last post by:
I'm having a problem with formviews and DropDownLists in ASP.NET 2.0. I'm using a formview to insert an order into a database. Part of the order is the customer. Currently, I have a dropdownlist...
0
by: boomhauer | last post by:
Hi, Im using a lot of formview's in my asp.net app, and it gets a bit frustrating to tie a datasource to the formview and have it generate the labels and fields for the datasource, to only then...
2
by: Kelly | last post by:
I'm fairly new to ASP.NET2, but I have an ASP 3.0 background, and I've been experimenting with the DataSource and FormView widgets. I wound up having some questions along the way which I hope you...
0
by: =?Utf-8?B?TGFkaXNsYXYgTXJua2E=?= | last post by:
Hello, I read some msdn and other articles about how does databinding among DataSource controls and FormView / GridView controls works but I still don't fully understand to this blackbox. I have...
5
by: Mark Olbert | last post by:
It appears that FormView controls require the >>exact<< same layout of controls and control types in the various templates in order to function properly. Failure to do so results in a "failure to...
8
by: =?Utf-8?B?QXNo?= | last post by:
Hi, I have an object, for example User. User contains various properties which i have been able to bind to successfully using wizards and the form view. However if the class User has a property...
4
by: pankajsingh5k | last post by:
Hi guys, These question is for all the experts... Please help me before my brain explodes The problem is again with the formview control.. I have a formview and i have to use it that...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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
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
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...

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.