Click here to Skip to main content
15,918,742 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Can anybody help me. I encounter this problem everytime i click the button to submit the details.

VB
Protected Sub ButtonViewCustomerdetails_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonViewCustomerdetails.Click
        MultiView1.SetActiveView(ViewSummary)

        Dim NewCustomer As New DataSet1TableAdapters.Customer3TableAdapter
        NewCustomer.InsertCustomer3(Session("guid"), Me.TextBoxFirstName.Text, Me.TextBoxLastName.Text, Me.TextBoxAddress1.Text, Me.TextBoxAddress2.Text, Me.TextBoxCity.Text, Me.TextBoxPostalcode.Text, Me.TextBoxCountry.Text, Me.TextBoxTelephone.Text, Me.TextBoxMobile.Text, Me.TextBoxEmail.Text)

        Dim Customerconfirm As New DataSet1TableAdapters.Customer3TableAdapter
        Dim Confirmcustomer As New DataSet1.Customer3DataTable
        Confirmcustomer = Customerconfirm.GetDataByCustomer31(Session("guid"))

        Dim ID As String = Confirmcustomer.Rows(0)("CustomerID")

        LabelCustomerID.Text = ID
    End Sub
Posted

1 solution

i think you need to write Session("guid") as Session("guid").tostring() if it is a varchar datatype else if it is int then convert it to int
you need to convert the session to string and other text boxes also to be in proper format like string and others which you have assigned in database to respective columns
 
Share this answer
 
v2
Comments
StevensonLee 11-Apr-12 10:09am    
Thank you very much!!!
prasad13.sawant 11-Apr-12 10:33am    
is it rite or you are still stuck in it?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900