Sunday, February 19, 2012

database problem

i have 2 database tables and want the primary key from table 1 to appear in table 2. The tables are connected to two web forms, so in other words, the user enters personal details into form1 which is sent to table1..then the user enters company details into form 2 which is sent to table 2, the trouble is, is that at the moment there is no way of telling which personal details relate to which company details...

any ideas?

When you direct users to form 2, send a parameter: Response.Redirect("Form2.aspx?ID=" + ID.ToString())

Alternately, if users login, then you have some way to identify which user is logged in (User.Identity.Name will likely have some useful information on who the user is). Another alternative is to use a session variable.

|||

ok, how would that ...Response.Redirect("Form2.aspx?ID=" + ID.ToString())...store it in database table 2?

i dont understand how this works

No comments:

Post a Comment