473,804 Members | 3,446 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Wizards - 2 way data binding not possible?

Hi,

A bit long winded this one, but would be grateful for some help.

I have a problem using the Wizard component and can think of only two
ways of completing the task.
Can anyone with some Wizard experience have a read of my two methods and
let me know if there are alternatives?

1. Each step of the wizard has each component (Textboxes etc) dropped
on. This means I cannot use data binding and
have to write a lot of code, both for adding then saving the details.

2. I use FormViews & SqlDataSoruce on each Wizard step, allowing 2 way
data binding,
but the Next button needs to have a Command Name of Insert.
On the Inserting method I capture the newly created Command object and
hold it in the Session.
The Next button has an On_Click event to
increment the Wizard step. This is repeated for each step and at the
Finish step I use the stored Command objects wrapped around a
transaction
to verify all Inserts were successfull.

So, pass in the 3 Command objects (my wizard has 3 steps)

public bool Insert(SqlComma nd cmd1, SqlCommand cmd2, SqlCommand cmd3)
{
SqlCommand masterCmd = new SqlCommand();

//Open connection etc
//Start a transaction using masterCmd

masterCmd.Comma ndText = cmd1.CommandTex t;
masterCmd.Comma ndParameters = cm1.CommandPara mters; //Might not be
as easy this.

masterCmd.Execu teNonQuery();
masterCmd.Param ters.Clear(); //We need to add new params

//repeat this process for cmd2 & cmd3

//Rollback or Commit
}

Ideally I would have preferred calling Insert() directly from my
webpage, but this does not seem to work.
The parameters are always null.
If someone could spare 5 minutes and add a FormView with a SqlDataSource
and attempt to Invoke the Insert manually
(ie dont have an insert button on the FormView with a Command Name
Insert). Just add a normal button and make a
call to the SqlDataSources Insert method.

Can anyone help?

Steven

*** Sent via Developersdex http://www.developersdex.com ***
Apr 5 '06 #1
0 1210

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

Similar topics

0
1559
by: Cees Wesseling | last post by:
For a couple of years I am using now my own data binding tool that can create C++ classes from a DTD. At this moment I need to reconsider this tool since I want to use W3C XML Schemas and need to output to more languages: C, C++, C#, python and Java. In reviewing existing tools I came the following preliminary conclusions on which I like your comments: - there is no single open source tools capable of supporting all the mentioned...
5
2518
by: pmud | last post by:
Hi, I need to display columns in a data grid based on 7 different queries. Now I have 32 questions: 1. Is it possble to have 1 single data adapter with 7 queries & 1 data set or do I need to have a separate data adapter & a separate data set for each select query? If thats possible then how?
1
2605
by: matty.hall | last post by:
There's a lot of information out there about data-binding UI objects (i.e. derived from Control) to non-UI custom business objects. Is it possible to do the same without any UI being involved at all? Here's an example: I want to do data binding on some of the properties of a TreeNode (namely its Name). Unfortunately, TreeNode does not derive from Control, so it doesn't have the "stock" data binding stuff. I'd like to create a new...
6
1337
by: Brad | last post by:
I have a web service which returns a collection of class object (see below). I want to consume this service in another web application by binding it to a List control The data returns from the web service, however when I bind the data I get the following error **** DataBinder.Eval: 'UserServices.User' does not contain a property with the name FirstName. **** Debugging I see that the list controls data source is a System.Array with...
9
5342
by: Timm | last post by:
I have an ASP.NET 2.0 page with two DropDownLists. I am using declarative data binding wherever possible and trying to minimize the use of code. The list of values in DropDownList DDL2 should be (filtered) dependent upon the selection in DDL1. I think this inevitably needs some code, but I'd be happy to be told otherwise! I have some code to handle OnSelectedIndexChanged for DDL1 that sets the FilterExpression associated with the...
0
1536
by: Larry Serflaten | last post by:
I am not sure how many are aware of this sort of data binding, but as it is new to many (classic) VB developers I thought I would post this once just to let people know of its availablility. There are cases where properties of one object is dependant on a property of another object. For a common example, when you bind an ArrayList to a ComboBox using the combo's DataSource property, the combo box fills up with items from the array list....
0
1856
by: EricLondaits | last post by:
Hi, I have an ASP.NET page with a ListBox that is data bound to a table with a single field (it holds a list of valid IDs). The page also has a textBox into which you can add new valid IDs, one per line (this is in order to make the process of adding new IDs easy, since it's only done at time of configuration). I have no problem with retrieving the contents of the textBox, splitting it into a string array, validating the individual...
0
2929
by: =?Utf-8?B?Q3JhaWdo?= | last post by:
Background: I am currently using WCF for remoting (using CSLA hosted in IIS) with a binding config entry like this: <binding name ="default" transferMode="Buffered" messageEncoding="Text" maxReceivedMessageSize="65536" > </binding> In WCF it is possible to stream data in chunks as described here:
0
4761
MrMancunian
by: MrMancunian | last post by:
How to create a database connection without using wizards Introduction I've seen a lot of questions on the net about getting data from, and saving data to databases. Here's a little insight how to do that using .NET code. I prefer using code instead of wizards, because you are completely in charge of connections. This article is written for both Visual Basic.NET 2005 and C# 2005 and will discuss how to use an MS Sql database. OleDB works...
0
10586
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
10338
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
10323
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
9161
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...
0
6856
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
5525
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...
0
5658
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2997
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.