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. ASP.NET
  4. Can't change controls name !

Can't change controls name !

Scheduled Pinned Locked Moved ASP.NET
csharphelpasp-netvisual-studiotutorial
12 Posts 6 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 ips_sun

    hi Experts! I am working on a website in ASP.Net/C#.Net.I am new to .Net Platform and also new to Web Development. My problem is.... if i change the name of any of the controls in an aspx page .... for example there is a textbox... when i change its name... i get an error message "The Directory Name is Invalid". And the IDE resets its name to the previous one. I mean i m not able to change its name. Thanx in Advance! Regards IPS

    H Offline
    H Offline
    honeyss
    wrote on last edited by
    #2

    I think u r changing it when running the program.Stop the program go to source and change the name

    I 1 Reply Last reply
    0
    • I ips_sun

      hi Experts! I am working on a website in ASP.Net/C#.Net.I am new to .Net Platform and also new to Web Development. My problem is.... if i change the name of any of the controls in an aspx page .... for example there is a textbox... when i change its name... i get an error message "The Directory Name is Invalid". And the IDE resets its name to the previous one. I mean i m not able to change its name. Thanx in Advance! Regards IPS

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #3

      Probably you would be giving invalid name to them. Can you tell what names are you trying to assign.

      Apurva Kaushal

      I J 2 Replies Last reply
      0
      • _ _AK_

        Probably you would be giving invalid name to them. Can you tell what names are you trying to assign.

        Apurva Kaushal

        I Offline
        I Offline
        ips_sun
        wrote on last edited by
        #4

        Apurva Kaushal wrote:

        Probably you would be giving invalid name to them

        No i am not giving any invalid name. say if textbox's name is tbFirstname.. then i am changing it to tbFaxNo. thats it!

        _ 1 Reply Last reply
        0
        • H honeyss

          I think u r changing it when running the program.Stop the program go to source and change the name

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

          honeyss wrote:

          I think u r changing it when running the program

          No i am not changing it at run time.

          1 Reply Last reply
          0
          • _ _AK_

            Probably you would be giving invalid name to them. Can you tell what names are you trying to assign.

            Apurva Kaushal

            J Offline
            J Offline
            Junior Boy
            wrote on last edited by
            #6

            I have experience with this problem! You can try to change its name in HTML tag ID="TextBox1" in source page. Example : id="TextBox1" runat="server"> Good luck :)

            junior boy

            I 1 Reply Last reply
            0
            • I ips_sun

              Apurva Kaushal wrote:

              Probably you would be giving invalid name to them

              No i am not giving any invalid name. say if textbox's name is tbFirstname.. then i am changing it to tbFaxNo. thats it!

              _ Offline
              _ Offline
              _AK_
              wrote on last edited by
              #7

              Which version of asp.net are you working on?

              Apurva Kaushal

              1 Reply Last reply
              0
              • J Junior Boy

                I have experience with this problem! You can try to change its name in HTML tag ID="TextBox1" in source page. Example : id="TextBox1" runat="server"> Good luck :)

                junior boy

                I Offline
                I Offline
                ips_sun
                wrote on last edited by
                #8

                Junior Boy wrote:

                You can try to change its name in HTML tag ID="TextBox1" in source page. Example : id="TextBox1" runat="server">

                Hey Junior Boy.... it has solved my problem.. Thanx..! but i just want to know why did it happen? Can u tell me the reason?

                I S 2 Replies Last reply
                0
                • I ips_sun

                  Junior Boy wrote:

                  You can try to change its name in HTML tag ID="TextBox1" in source page. Example : id="TextBox1" runat="server">

                  Hey Junior Boy.... it has solved my problem.. Thanx..! but i just want to know why did it happen? Can u tell me the reason?

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

                  No, I'am using VS 2005!

                  C _ 2 Replies Last reply
                  0
                  • I ips_sun

                    No, I'am using VS 2005!

                    C Offline
                    C Offline
                    codingrocks
                    wrote on last edited by
                    #10

                    Me too experienced the same probs long back.. Its due to reference and dependencies made by the control to the register..... Hope u can do it now...

                    SAJAN A PILLAI C#.NET Programmer TELESOFT INDIA PVT LTD... BANGALORE

                    1 Reply Last reply
                    0
                    • I ips_sun

                      Junior Boy wrote:

                      You can try to change its name in HTML tag ID="TextBox1" in source page. Example : id="TextBox1" runat="server">

                      Hey Junior Boy.... it has solved my problem.. Thanx..! but i just want to know why did it happen? Can u tell me the reason?

                      S Offline
                      S Offline
                      Sandeep Akhare
                      wrote on last edited by
                      #11

                      Problem might be If you change the deafult name in Designer.cs file it create object of textbox and assign delgates to it If you change the name of the control then it is not valid Did you tried changing the name of control in some other event like Init or preinit i think that will not give problem

                      Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

                      1 Reply Last reply
                      0
                      • I ips_sun

                        No, I'am using VS 2005!

                        _ Offline
                        _ Offline
                        _AK_
                        wrote on last edited by
                        #12

                        You can have a look at this[^] .

                        Apurva Kaushal

                        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