473,663 Members | 2,877 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting up ObjectDataSourc e Control when target method takes object as a parameter...

Hi:

I'm using the ObjectDataSourc e control to databind a Repeater. The method
on business object that ObjectDataSourc e control point to takes as a
parameter an instance of the System.Data.Com mandType enumeration. When
setting up declaritively in HTML, how do I complete the following parameter
assignment...

<asp:Paramete r Name="commandTy pe" Type="Object" DefaultValue="? ???" />

Thanks,
Charlie
Sep 12 '06 #1
2 1716
I'm pretty sure you'd need to set it programmaticall y rather than
declaritavely. You can set it in the page load if you want, or you can
set it in the Selecting event of the ObjectDataSourc e.

Charlie@CBFC wrote:
Hi:

I'm using the ObjectDataSourc e control to databind a Repeater. The method
on business object that ObjectDataSourc e control point to takes as a
parameter an instance of the System.Data.Com mandType enumeration. When
setting up declaritively in HTML, how do I complete the following parameter
assignment...

<asp:Paramete r Name="commandTy pe" Type="Object" DefaultValue="? ???" />

Thanks,
Charlie
Sep 12 '06 #2
I came to same conclusion. Thanks.
<mi*******@hotm ail.comwrote in message
news:11******** *************@d 34g2000cwd.goog legroups.com...
I'm pretty sure you'd need to set it programmaticall y rather than
declaritavely. You can set it in the page load if you want, or you can
set it in the Selecting event of the ObjectDataSourc e.

Charlie@CBFC wrote:
>Hi:

I'm using the ObjectDataSourc e control to databind a Repeater. The
method
on business object that ObjectDataSourc e control point to takes as a
parameter an instance of the System.Data.Com mandType enumeration. When
setting up declaritively in HTML, how do I complete the following
parameter
assignment.. .

<asp:Paramet er Name="commandTy pe" Type="Object" DefaultValue="? ???" />

Thanks,
Charlie

Sep 12 '06 #3

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

Similar topics

12
8688
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press update after making changes, but I don't want that update button. How can I get the updated object when the user presses one of my other action buttons?
5
1975
by: Ole M | last post by:
I'm having some trouble using the ObjectDataSource in ASP.NET 2.0. I have a wrapper that contains the static methods for Select and Update. The Update-method takes the business object as parameter. When the Update-method is invoked by the ObjectDataSource, the object referenced is not the same object returned by the Select-method, but a new object with only the values from the Edit-template. So basically I get a reference to a useless...
7
3451
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function 'UpdateRegistrant' expects parameter '@EMail', which was not supplied. The field value was null in the database and not changed in the FormView so is null going back into the stored procedure. I'm stumped and would greatly appreciate any suggestions.
2
6260
by: J055 | last post by:
Hi I've implemented caching for my ObjectDataSource. <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" EnableCaching="True" CacheDuration="10" CacheExpirationPolicy="Sliding" SelectMethod="GetUsers" TypeName="BizObject"></asp:ObjectDataSource> This works, however I need to explicitly clear/remove the cache when I
1
1693
by: =?Utf-8?B?cm9zczYxMw==?= | last post by:
I really hope this is not a case of "this silly thing will never work".....lots of time invested in troubleshooting this already. I have created a standard ASP.NET web form (.aspx) with several collections of textboxes prompting for entry into a fairly monolithic database. I decided to create a business object (called Employee) and use the ObjectDataSource to broker data being transmitted between the UI and my Employee object (and...
11
3247
by: MikeT | last post by:
This may sound very elementary, but can you trap when your object is set to null within the object? I have created a class that registers an event from an object passed in the constructor. When my object is destroyed, I want my object to un-register this event. If I don't then the object would never be destroyed until the object I passed in the constructor is destroyed. I have implemented a Dispose(), Dispose(bool), and ~Finalize...
0
2764
by: =?Utf-8?B?Z292ZXI=?= | last post by:
Hello, I have a Formview in insert mode with a fileUpload control on it. I'm trying to get the contents of the uploaded file passed to my ObjectDataSource to be persisted to my database. The Method called by the Insert method takes a parametare called DocBlob of type byte for the file contents. When I generate an object datasource using this method, it generates the parameter below: <asp:Parameter Name="DocBlob" Type="Object" /> Now...
1
5409
by: Max2006 | last post by:
Hi, I am truing to find a pattern for my Business Logic Layer to be able to work fine win ObjectDataSource's Update method. The challenge is ObjectDataSource is not able to work with an update method that accepts a strongly typed data table as parameters. We have to have an update method with all data table's columns as its parameter. Like what we have here: http://asp.net/learn/data-access/tutorial-16-cs.aspx
5
2166
by: cmrchs | last post by:
Hi, I'm trying out Databinding to a Data Acces Layer using a ObjectDataSource-control The Update works fine but the Delete-method doesn't. when debugging I see that my productID-parameter is always 0 and not the ID of the selected record (which is the case when updating) How come?
0
8436
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
8858
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...
1
8548
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
8634
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
7371
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
6186
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
5657
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4182
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...
2
1757
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.