Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 10-08-2009
Member
 
Join Date: Feb 2009
Posts: 96
Visual studio web.net

is there any reason why this wont transfer the information from control 2 to control 3?

Thanx in advance

Daren





Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub sameCheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles sameCheckBox1.CheckedChanged
If Me.sameCheckBox1.Checked = True Then

CustomerInfoWebUserControl2.getVal() 'get the values to fill in the shipping address

CustomerInfoWebUserControl3.fName = CustomerInfoWebUserControl2.fName
CustomerInfoWebUserControl3.lName = CustomerInfoWebUserControl2.lName
CustomerInfoWebUserControl3.address = CustomerInfoWebUserControl2.address
CustomerInfoWebUserControl3.city = CustomerInfoWebUserControl2.city
CustomerInfoWebUserControl3.state = CustomerInfoWebUserControl2.state
CustomerInfoWebUserControl3.zip = CustomerInfoWebUserControl2.zip
CustomerInfoWebUserControl3.email = CustomerInfoWebUserControl2.email

CustomerInfoWebUserControl2.setVal()
Else
'clear the text boxes
CustomerInfoWebUserControl3.fName = ""
CustomerInfoWebUserControl3.lName = ""
CustomerInfoWebUserControl3.address = ""
CustomerInfoWebUserControl3.city = ""
CustomerInfoWebUserControl3.state = ""
CustomerInfoWebUserControl3.zip = ""
CustomerInfoWebUserControl3.email = ""
CustomerInfoWebUserControl3.setVal()
End If
End Sub



Partial Class CustomerInformationControl
Inherits System.Web.UI.UserControl
Private first, last, address_C, city_C, state_C, email_C, zip_C As String


Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load


End Sub
Public Sub getVal()
fName = txtFirst.Text
lName = txtLast.Text
address_C = txtAddress.Text
city_C = txtCity.Text
state_C = txtState.Text
email_C = txtEmail.Text
zip_C = txtZip.Text
End Sub

Public Sub setVal()
txtFirst.Text = fName
txtLast.Text = lName
txtAddress.Text = address_C
txtCity.Text = city_C
txtState.Text = state_C
txtEmail.Text = email_C
txtZip.Text = zip_C
End Sub

Public Property fName() As String
Get
Return first
End Get
Set(ByVal value As String)
first = value
End Set
End Property

Public Property lName() As String
Get
Return last
End Get
Set(ByVal value As String)
last = value
End Set
End Property

Public Property address() As String
Get
Return address_C
End Get
Set(ByVal value As String)
address_C = value
End Set
End Property

Public Property city() As String
Get
Return city_C
End Get
Set(ByVal value As String)
city_C = value
End Set
End Property

Public Property state() As String
Get
Return state_C
End Get
Set(ByVal value As String)
state_C = value
End Set
End Property

Public Property email() As String
Get
Return email_C
End Get
Set(ByVal value As String)
email_C = value
End Set
End Property

Public Property zip() As String
Get
Return zip_C
End Get
Set(ByVal value As String)
zip_C = value
End Set
End Property

End Class
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Visual studio web.net"
Thread Thread Starter Forum Replies Last Post
Visual Studio 2010: features and changes compared to Visual Studio 2008 BinDs14 Guides & Tutorials 2 16-02-2011 02:49 PM
Compare Visual Studio 2010 and Visual Web Developer Express Zacharia Software Development 5 28-01-2010 04:27 AM
Visual Studio.net Daren Software Development 1 12-08-2009 08:47 AM
Difference between Visual studio 2005 and Visual studio 2008 RohanS Software Development 3 12-06-2009 10:48 AM
difference between Visual Studio 6 & studio 2003 yeshwant Software Development 1 10-04-2009 10:01 PM


All times are GMT +5.5. The time now is 08:04 AM.