OK,
I'm starting to think that I need a basic primer on data-sets. I've got
an excellent knowledge of how to do all of this in PHP, I just don't
understand how to do it in ASP.net and C#.
My usual approach to a task like this would be to create a form where
you insert the persons name, email address (doubling up as a user name)
and password into the database on page one of the "Registration Wizard".
Page one would also retrieve the persons ID from the database and place
it into a session variable.
Page two would retrieve the session variable and insert Postal Address,
phone/fax etc into a different table, setting the personId field in that
table to the value of the session variable.
Now here's the trick I usually use. My add.php usually consists of all
of the possible options inside nested switch statements for example
$type = $_GET['t'];
$pgNum = $_GET['pgNum'];
$pId = $_SESSION['pid'];
switch ($type){
case "per":
switch($pgNum){
case "1":
display Page one information
break;
case "2":
display page 2 info
break;
case ...
}
case "branch":
// display page 1 - x of the add branch code
break;
}
and all the HTML code for the forms would be generated in this way too,
by the page.
I can't find a way to do this in ASP.net, and if it is not do-able, that
is a major failing IMHO.
I am also having issues with Data Objects. I just don't understand it.
If I want to insert data into a database, I seem to have to create a
DataSet, add data to it, then save it to the database. Why can't I
just execute a straight SQL INSERT statement from the code?[1] It would
save memory on run-time (this application is expected to have a huge
amount of use) and safe on file size too.
If anyone can help me learn how to do this (MVP/MCSA/MCAD/MCSE/MCP's I'm
looking in your direction... :oP ), then I will be eternally grateful.
Please understand, I don't want you to do it for me, I just need to be
taught how to do it in a way that makes sense!
Regards,
Matt
[1] This may well be possible, I just don;t understand my books. The
course books I've been given teach things in a different way to the way
my mentor did and I think that if I went back to him, I'd just get even
more confused.
M
On Wed, 29 Jun 2005 09:39:11 +0100
Matthew Macdonald-Wallace <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Once again, I'm trying to sort out this database app and I'm really
> not too sure how to do this malarky in ASP, give me PHP any day! :)
>
> Anyways, the issue I'm having is as follows:
>
> I have a form (addPerson.aspx) into which is put personnel data such
> as firstname, email address and Postal Address as well as a password.
>
> I then have another form (addPB.aspx) that should take the ID of the
> newly added person and associate them to a branch. The problem is
> that I can work out a way to forward the new ID Number information
> automatically and securely between forms.
>
> If anyone can point me in the right direction or to an article that
> might help, I'd be very grateful.
>
> Cheers,
>
> Matt
>
> --
> Matthew Macdonald-Wallace
> [EMAIL PROTECTED]
> "Quis custodiet ipsos custodes?"
>
>
>
> ____ The WDVL Discussion List from WDVL.COM ____
> To Join wdvltalk, Send An Email To:
> mailto:[EMAIL PROTECTED] or use the web
> interface http://e-newsletters.internet.com/discussionlists.html/
> Send Your Posts To: [email protected]
> To change subscription settings, add a password or view the web
> interface: http://intm-dl.sparklist.com/read/?forum=wdvltalk
>
> ________________ http://www.wdvl.com _______________________
>
> You are currently subscribed to wdvltalk as:
> [EMAIL PROTECTED] To unsubscribe send a blank email to
> [EMAIL PROTECTED] To unsubscribe via postal mail,
> please contact us at: Jupitermedia Corp.
> Attn: Discussion List Management
> 475 Park Avenue South
> New York, NY 10016
>
> Please include the email address which you have been contacted with.
____ The WDVL Discussion List from WDVL.COM ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: unknown lmsubst tag argument: ''
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016
Please include the email address which you have been contacted with.