Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. inheritance

inheritance

Scheduled Pinned Locked Moved C#
helpcsharpdebuggingxmloop
9 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Idoshhh
    wrote on last edited by
    #1

    Hi all, i am new in C# environment. i try to create a desktop application. i have 2 classes (form1 & createXML) the form1 located a textBox that called txtPhoneNumber. now, when the user will write his phone number the application will send him an SMS. the problem is that the txtPhoneNumber.Text doesn't send the user number to the createXML class. the XML is look like: strBuild = strBuild.Append(""); //Destinations strBuild = strBuild.Append(inputForm.txtPhoneNumber.Text); //input from the form1 Class strBuild = strBuild.Append(""); but in the debug i see that there is no number. and there is no any hint for error. any idea? please help!!!

    I M D 3 Replies Last reply
    0
    • I Idoshhh

      Hi all, i am new in C# environment. i try to create a desktop application. i have 2 classes (form1 & createXML) the form1 located a textBox that called txtPhoneNumber. now, when the user will write his phone number the application will send him an SMS. the problem is that the txtPhoneNumber.Text doesn't send the user number to the createXML class. the XML is look like: strBuild = strBuild.Append(""); //Destinations strBuild = strBuild.Append(inputForm.txtPhoneNumber.Text); //input from the form1 Class strBuild = strBuild.Append(""); but in the debug i see that there is no number. and there is no any hint for error. any idea? please help!!!

      I Offline
      I Offline
      Idoshhh
      wrote on last edited by
      #2

      i didn't ignore the HTML tags........ fixed XML builder: strBuild = strBuild.Append(""); strBuild = strBuild.Append(inputForm.txtPhoneNumber.Text); strBuild = strBuild.Append("");

      1 Reply Last reply
      0
      • I Idoshhh

        Hi all, i am new in C# environment. i try to create a desktop application. i have 2 classes (form1 & createXML) the form1 located a textBox that called txtPhoneNumber. now, when the user will write his phone number the application will send him an SMS. the problem is that the txtPhoneNumber.Text doesn't send the user number to the createXML class. the XML is look like: strBuild = strBuild.Append(""); //Destinations strBuild = strBuild.Append(inputForm.txtPhoneNumber.Text); //input from the form1 Class strBuild = strBuild.Append(""); but in the debug i see that there is no number. and there is no any hint for error. any idea? please help!!!

        M Offline
        M Offline
        musefan
        wrote on last edited by
        #3

        Why dont you look into using system.data.datatable you can add columns names and data etc. then you can use datatable.writexml() to produce the file for you Just a suggestion BTW

        I 1 Reply Last reply
        0
        • I Idoshhh

          Hi all, i am new in C# environment. i try to create a desktop application. i have 2 classes (form1 & createXML) the form1 located a textBox that called txtPhoneNumber. now, when the user will write his phone number the application will send him an SMS. the problem is that the txtPhoneNumber.Text doesn't send the user number to the createXML class. the XML is look like: strBuild = strBuild.Append(""); //Destinations strBuild = strBuild.Append(inputForm.txtPhoneNumber.Text); //input from the form1 Class strBuild = strBuild.Append(""); but in the debug i see that there is no number. and there is no any hint for error. any idea? please help!!!

          D Offline
          D Offline
          DaveyM69
          wrote on last edited by
          #4

          How exactly is inputForm getting into the createXML class?

          Dave
          BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
          Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

          I 1 Reply Last reply
          0
          • M musefan

            Why dont you look into using system.data.datatable you can add columns names and data etc. then you can use datatable.writexml() to produce the file for you Just a suggestion BTW

            I Offline
            I Offline
            Idoshhh
            wrote on last edited by
            #5

            Hi, thanks for the fastest answer!! i don't need to add columns or names, the single integer in the XML is the txtPhoneNumber. the XML is ok, but he doesn't get the phone number integer.

            M 1 Reply Last reply
            0
            • I Idoshhh

              Hi, thanks for the fastest answer!! i don't need to add columns or names, the single integer in the XML is the txtPhoneNumber. the XML is ok, but he doesn't get the phone number integer.

              M Offline
              M Offline
              musefan
              wrote on last edited by
              #6

              should you have a number as an integer? you will lose a leading 0 with some numbers. your 'To' is a column name, no?

              1 Reply Last reply
              0
              • D DaveyM69

                How exactly is inputForm getting into the createXML class?

                Dave
                BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
                Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

                I Offline
                I Offline
                Idoshhh
                wrote on last edited by
                #7

                namespace.TakeNumber inputForm = new TakeNumber(); then: input get the txtPhoneNumber but without values...... :-(

                D 1 Reply Last reply
                0
                • I Idoshhh

                  namespace.TakeNumber inputForm = new TakeNumber(); then: input get the txtPhoneNumber but without values...... :-(

                  D Offline
                  D Offline
                  DaveyM69
                  wrote on last edited by
                  #8

                  Ido Shahar wrote:

                  new TakeNumber()

                  That's why. It's an different instance so the new instance's txtPhoneNumber is empty

                  Dave
                  BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
                  Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

                  I 1 Reply Last reply
                  0
                  • D DaveyM69

                    Ido Shahar wrote:

                    new TakeNumber()

                    That's why. It's an different instance so the new instance's txtPhoneNumber is empty

                    Dave
                    BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
                    Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

                    I Offline
                    I Offline
                    Idoshhh
                    wrote on last edited by
                    #9

                    o.k. got it! what an idiot i am. thank you so much!!

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups