Solved

I need the user to be able to add information in a form using classes in vb.net

Posted on 2004-11-01
220 Views
Last Modified: 2010-04-17
I need a user to be able to add first name, last name,  address, city, state, and zip from a form.  In my program I have a person file that has a constructor with all of the following info.

In class how do I go about this?
0
Question by:Kahlan27265
    2 Comments
     
    LVL 19

    Expert Comment

    by:arif_eqbal
    ?? Could not get your Query

    You need to have a Form with these fields and User will add Record
    When he clicks save the data is to be passed to a class which will save it

    Is this what you want??
    0
     
    LVL 6

    Accepted Solution

    by:
    Public Class clsUser
       Private mName
       Private mSurname
       Private mAddress

      Public Function Create (Optional inName as string = "", Optional inSurname as string = "", Optional inAddress as string = "") as Boolean
      mName = inName
      mSurname = inSurname
      mAddress = inAddress
      return true
    End Function
    End Class

    in your form

    Public Function Submit_Button_Click
      Dim mUser as new clsUser
     Dim mResponse as boolean =  mUser.Create txtName.Text, txtSurname.Text, txtAddress.Text
    if mResponse then
      msgbox "Success"
    else
      msgBox "Fail"
    End if
    end function
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    860 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now