|
-
Oct 8th, 2003, 04:26 PM
#1
Thread Starter
New Member
NewBie: Help with Database Insertion over different project/pages
Hi all:
How do you 'transfer' data from one project to another within the same solution? This is simular to the bound/unbound functions in Access VBA.
One the first page, I have a pull-down menu and I pick the name of the user (which the data is stored in an Access database).
On another page, I require that the name that was selected along with date selected to be displayed in the appropriate textboxes.
How is this possible?
-
Oct 8th, 2003, 06:25 PM
#2
Lively Member
Pages? As in ASP.NET pages? You could pass variables any number of ways. Session variables, POST header, or querystring to name a few. If you're talking about a Winform app, then all you need to do is pass the values as parameters to the other form such as:
Public Sub Load_Data(Name as string, SelectedDate as Date)
txtName.Text = Name
txtSelectedDate.Text = SelectedDate.ToString()
Me.Show()
End Sub
or something along those lines anyway.
The OOP way to do it is to create an object that sets some property values and then access the object when you need to get the values.
-
Oct 8th, 2003, 06:28 PM
#3
Note to transfer data as damonous suggested the pages and/or forms need to be in the same project. Are you talking about different pages or different projects? Transferring data between different projects is a bit different and can get more complicated depending on the different project types.
-
Oct 14th, 2003, 04:22 PM
#4
Thread Starter
New Member
Thank you for your response.
Maybe to make myself more clear.
What i want is purely VB.net (not that asp thing or whatever)
I want to insert the same data in one FORM to another.
Form1. I log-in or choose from a list of names in a drop down combobox. That name is then showed in a text box
Form2. I go to another form and I want the same name showed in a textbox without me having to pick and choose again (or log in).
Thanks in Advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|