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. Web Development
  3. label problem in c#

label problem in c#

Scheduled Pinned Locked Moved Web Development
csharphelpquestion
5 Posts 5 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.
  • K Offline
    K Offline
    KUNWAR999
    wrote on last edited by
    #1

    hey guys,.. i am doing my mini project in c# windows form application .. in that i used a label like Label a=new Label(); a.Text="&"; MessageBox.Show();//its showing blank message box Can anyone knows solution for it??

    D N D G 4 Replies Last reply
    0
    • K KUNWAR999

      hey guys,.. i am doing my mini project in c# windows form application .. in that i used a label like Label a=new Label(); a.Text="&"; MessageBox.Show();//its showing blank message box Can anyone knows solution for it??

      D Offline
      D Offline
      David Mujica
      wrote on last edited by
      #2

      It looks like you created a label, assigned it the "&" symbol, but when you show the message box, you don't put the label in any one of the message box parameters.

      1 Reply Last reply
      0
      • K KUNWAR999

        hey guys,.. i am doing my mini project in c# windows form application .. in that i used a label like Label a=new Label(); a.Text="&"; MessageBox.Show();//its showing blank message box Can anyone knows solution for it??

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        This is the wrong forum. Your question does not relate to Web Development. You will get better results by using the correct forum. The messagebox is empty because you have not specified a message. Use one of the overloads found in the documentation[^]


        Failure is not an option; it's the default selection.

        1 Reply Last reply
        0
        • K KUNWAR999

          hey guys,.. i am doing my mini project in c# windows form application .. in that i used a label like Label a=new Label(); a.Text="&"; MessageBox.Show();//its showing blank message box Can anyone knows solution for it??

          D Offline
          D Offline
          denny philip
          wrote on last edited by
          #4

          Label a=new Label();
          a.Text="&";
          MessageBox.Show(a.Text);//you missed a.Text

          1 Reply Last reply
          0
          • K KUNWAR999

            hey guys,.. i am doing my mini project in c# windows form application .. in that i used a label like Label a=new Label(); a.Text="&"; MessageBox.Show();//its showing blank message box Can anyone knows solution for it??

            G Offline
            G Offline
            GenJerDan
            wrote on last edited by
            #5

            "&" is special. It's used to underline the letter that follows it. I think doing "&&" will make it show up by itself.

            No dogs or cats are in the classroom. My Mu[sic] My Films My Windows Programs, etc.

            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