473,748 Members | 4,065 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 ObjectDataSourc e, 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 2322
Put a BIND statement on the dropdownlist's SelectedValue property, e.g.

asp:DropDownLis t ID="ddlCountry " runat="server" DataSourceID="o dsCountries"
AutoPostBack="T rue"
SelectedValue=' <%# Bind("Country") %>'>
</asp:DropDownLis t>

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 ObjectDataSourc e, 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
6043
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 "LabLocation_ID". With an existing lab, they then need to add the members for that lab. So, what I am trying to do is the following. With the FormView of the Lab open, the user will click a button to open a FormView (InsertMode) and add a new...
2
8742
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 description (i.e. a colors table, so there is a colors ID and a color description). The data source the FormView is pulling data from stores (in this example) the primary key for the colors table. My ultimate goal is when the FormView goes into...
3
2019
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 bound to a datasource that simply selects all customers from a database table. The DropDownList's Selectedvalue is bound with the following expression: Bind("customerId") This works perfectly, the id is passed to a stored procedure and the...
0
1103
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 have to go hand-edit eveything to arrange the fields how I want them. Ive poked around in the formview to see if there is a way to overrid the default template rendering, but no luck so far.
2
2775
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 all can address to help me understand events with these better. I've been reading up on inserted/inserting also deleted/deleting, but where is it better to run call those events from via formview or datasource? Also, I have been trying to...
0
1991
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 few questions and hopefully you can provide me some answers. 1. Best place for DataBinding. Where is the best place for calling DataBind method? Is it possible to say don't bind controls for this postback and use current values instead? These...
5
6907
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 load ViewState" exception when a mode change occurs. Is this correct? If so, it would appear to defeat the >>entire point<< of being able to use customized templates for the various modes. Assuming this limitation exists, what's the...
8
11971
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 which is not a string, for example a custom type Address which contains properties such as StreetAddress, City, County, Country etc how do i bind to those properties on the same form view? I have tried doing Bind("Address.StreetAddress") but...
4
8562
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 when it displays it shows values from the database and i have a link button edit on the ItemTemplate that changes the mode to edit mode and allows to edit the values which can be edited...
0
9534
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
9366
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...
1
9316
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9241
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8239
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
6793
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
4597
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
3303
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
3
2211
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.