473,659 Members | 3,631 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

is there such a Cancel() method for FormView or ObjectDataSourc e?

hi everybody there,

i want to cancel inserting records on specific circumstance based on a
validation using ObjectDataSourc e's Inserting event. but need a
Cancel() method to rollback record insertion. is there any way?

i'm using datasets(xsd) and my final goal is to prevent some aspnet
users from inserting, updating and deleting records from specific
tables.

thanks in advance
afshar

Apr 25 '07 #1
1 1533
On Apr 25, 10:32 am, Afshar <afshar.mohe... @gmail.comwrote :
hi everybody there,

i want to cancel inserting records on specific circumstance based on a
validation using ObjectDataSourc e's Inserting event. but need a
Cancel() method to rollback record insertion. is there any way?

i'm using datasets(xsd) and my final goal is to prevent some aspnet
users from inserting, updating and deleting records from specific
tables.

thanks in advanceafshar


found it myself,
the e parameter passed to all events has a Cancel property that must
set to false in order to cancel operation.

Apr 30 '07 #2

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

Similar topics

5
2185
by: Jurgen Appelo | last post by:
I'm at a loss here... My FormView control automatically performs a databind at each postback on the server. But in some cases I don't want this to happen. Like when the business layer decides that some of the information in the controls cannot be accepted. But then the FormView binds to the datasource again, and the input in all contols is lost. And the user will have to type it all over again. In ASP.NET 1.1 we could simply say: If Not...
2
6614
by: hooterbite | last post by:
I am using an object datasource to call a stored procedure to update an SQL table. THE STORED PROCEDURE WORKS FINE! THE OBJECTDATASOURCE WORKS FINE! When the textbox is inside a standard HTML tag <table>, it passes the value of the textbox to the stored procedure, as expected. When the textbox is inside an <asp:table> tag, the default value assigned in the FormParameter tag is passed to the stored procedure, as if it can't find the...
5
1450
by: Dot Net Daddy | last post by:
Hello, I have an objectDateSource. But sometime there might not be any data for my application. So how can I know if the objectDataSource has no data? I binded a dropdownlist to this objectDataSource and I want to set the dropdownlist.visible = False, if there is no data. Thank You,
0
1263
by: kidders | last post by:
I have an business object bound to a formview with through an object datasource, in edit mode when i click update i receive the following error: The 'ActionID' property on the type specified by the DataObjectTypeName property in ObjectDataSource 'odsAction' is readonly and its value cannot be set. This is correct as the actionid property is readonly (being the primary key).
0
263
by: Afshar | last post by:
hi everyone there, i am checking a specific circumstance in Inserting event of FormView or ObjectDataSource controld and wants to be able to cancel inserting based upon my validation. but don't have a Cancel() method on them. how can do that? my ObjectDataSource is used with DataSet(xsd). my final goal is to permit or deny ASPNET users to insert records to database
0
1318
by: m.bagattini | last post by:
Hello folks, I'll try to be as much clear as I can. This is my issue: Asp.NET 2.0 page w/ FormView (later: FW), an ObjectDataSource (ODS). It works with my Business logic layer, where I have some methods to retrieve and set data. ODS works with this MyObjectManager object. MyObjectManager has GetObjects that return an ObjectsCollection and so on. Nothing special. MyObject has 3 properties, for example: Color, Description, Size...
3
8094
by: KaOne | last post by:
Hi All, excuse me in advance for my not very perfect english. I need some help about a problem with a FormView bounded to an ObjectDataSource. In practise I have an ObjectDataSource that uses some BLL methods that implements the optimistic concurrency by a TimeStamp field into the DB. So, when I execute an insert, update or delete query if I receive 0 like return value from that queries I understand that a concurrency problem is occurs so...
0
1836
by: TarTar | last post by:
Hello, I have the following code on my ASP.NET page: <asp:DataList ID="CustomersList" DataSourceID="CustomerDataSource" runat="server"> <ItemTemplate> Name: <asp:Label id="lblName" Text='<%# Eval("Name") %>' runat="server"/> </ItemTemplate>
4
4688
by: TarTar | last post by:
Hello, I have already posted this problem, but I have not received any response yet. I will try to describe it again. We have a list control (e.g. DataList) and an ObjectDataSource on an ASP.NET web page. When we open the page the Select method (here: GetCustomers) is called twice. Why? It is obvious performance hit as the data needs to be retrieved twice. How to avoid the duplicated calls?
0
1094
by: jphaycock | last post by:
I have a formview that uses an objectdatasource to insert and update records. I don't want to use the objectdatasource's "Delete" method so I have defined this method as "none" in the "configure datasource" wizard. I assumed I could use my own Delete Method by using the ItemCommand: protected void FormViewModule_ItemCommand(object sender, FormViewCommandEventArgs e) {
0
8337
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
8748
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
8531
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
8628
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...
1
6181
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
5650
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();...
1
2754
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
1978
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1739
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.