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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Exposing properties in a custom page template

Exposing properties in a custom page template

Scheduled Pinned Locked Moved ASP.NET
help
14 Posts 2 Posters 1 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 Ista

    is it public? Whats the definition of the property? 1 line of code equals many bugs. So don't write any!!

    A Offline
    A Offline
    ake_krakbar
    wrote on last edited by
    #3

    Jepp, the property is public and fully accessible from the page when used programmatically...

    I 1 Reply Last reply
    0
    • A ake_krakbar

      Jepp, the property is public and fully accessible from the page when used programmatically...

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

      can you paste the property definition please 1 line of code equals many bugs. So don't write any!!

      A 1 Reply Last reply
      0
      • I Ista

        can you paste the property definition please 1 line of code equals many bugs. So don't write any!!

        A Offline
        A Offline
        ake_krakbar
        wrote on last edited by
        #5

        Here goes: public class MunkebyPage : Page { [Browsable(true)] public string Testing { get { return testing; } set { testing = value; } } private string testing; etc... The problem could be that all other properties that you set in the propertybrowser are added declerative in some way. And this is not. Have you succeeded to solve this problem?

        I 1 Reply Last reply
        0
        • A ake_krakbar

          Here goes: public class MunkebyPage : Page { [Browsable(true)] public string Testing { get { return testing; } set { testing = value; } } private string testing; etc... The problem could be that all other properties that you set in the propertybrowser are added declerative in some way. And this is not. Have you succeeded to solve this problem?

          I Offline
          I Offline
          Ista
          wrote on last edited by
          #6

          It works. When you open the form it defaults to the DOCUMENT object In the drop down choose your web form and you will see it Nick 1 line of code equals many bugs. So don't write any!!

          A 1 Reply Last reply
          0
          • I Ista

            It works. When you open the form it defaults to the DOCUMENT object In the drop down choose your web form and you will see it Nick 1 line of code equals many bugs. So don't write any!!

            A Offline
            A Offline
            ake_krakbar
            wrote on last edited by
            #7

            Thanks for your reply! Selecting the webform (I suppose you mean the server side form) when working in the desinger is not possible. What version of Visual studio are you using? Is the designer in the "Design"- or in the "Source" mode?

            A I 2 Replies Last reply
            0
            • A ake_krakbar

              Thanks for your reply! Selecting the webform (I suppose you mean the server side form) when working in the desinger is not possible. What version of Visual studio are you using? Is the designer in the "Design"- or in the "Source" mode?

              A Offline
              A Offline
              ake_krakbar
              wrote on last edited by
              #8

              Ah when working in source mode the server side form of course is selectable. But does the properties you have added to the page class show up under server side form? That doesn´t make sense at all...

              1 Reply Last reply
              0
              • A ake_krakbar

                Thanks for your reply! Selecting the webform (I suppose you mean the server side form) when working in the desinger is not possible. What version of Visual studio are you using? Is the designer in the "Design"- or in the "Source" mode?

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

                Well everything is server side. For the class view, no you will not see it. In fact, you will never see it. But, when you open the WebForm to the html view. It is there. The source view you are reffering to is the class view. Which the designer view will never see. public class MyWebForm : MyPage you wont see the property in the class view. But showing the WebForm it will appear in the properties window 1 line of code equals many bugs. So don't write any!!

                A 2 Replies Last reply
                0
                • I Ista

                  Well everything is server side. For the class view, no you will not see it. In fact, you will never see it. But, when you open the WebForm to the html view. It is there. The source view you are reffering to is the class view. Which the designer view will never see. public class MyWebForm : MyPage you wont see the property in the class view. But showing the WebForm it will appear in the properties window 1 line of code equals many bugs. So don't write any!!

                  A Offline
                  A Offline
                  ake_krakbar
                  wrote on last edited by
                  #10

                  Hello Ista. Again, thankyou very much for your reply. Unfortunately I still don´t get this thing working at all. Are you using VS 2005?

                  I 1 Reply Last reply
                  0
                  • A ake_krakbar

                    Hello Ista. Again, thankyou very much for your reply. Unfortunately I still don´t get this thing working at all. Are you using VS 2005?

                    I Offline
                    I Offline
                    Ista
                    wrote on last edited by
                    #11

                    VS2003 at work Okay so describe every step you took in detail. Lets figure out what you dont understand 1 line of code equals many bugs. So don't write any!!

                    1 Reply Last reply
                    0
                    • I Ista

                      Well everything is server side. For the class view, no you will not see it. In fact, you will never see it. But, when you open the WebForm to the html view. It is there. The source view you are reffering to is the class view. Which the designer view will never see. public class MyWebForm : MyPage you wont see the property in the class view. But showing the WebForm it will appear in the properties window 1 line of code equals many bugs. So don't write any!!

                      A Offline
                      A Offline
                      ake_krakbar
                      wrote on last edited by
                      #12

                      Hello again Ista! Do you mean that you select this element in the code view, wich makes the property show in the property browser:

                      I 1 Reply Last reply
                      0
                      • A ake_krakbar

                        Hello again Ista! Do you mean that you select this element in the code view, wich makes the property show in the property browser:

                        I Offline
                        I Offline
                        Ista
                        wrote on last edited by
                        #13

                        I opened the web form up in the grid view the peoperties window combo box defaults to "DOCUMENT" I then changed the combo box to display the form name, my case WebFrom1. Then the property appeared 1 line of code equals many bugs. So don't write any!!

                        A 1 Reply Last reply
                        0
                        • I Ista

                          I opened the web form up in the grid view the peoperties window combo box defaults to "DOCUMENT" I then changed the combo box to display the form name, my case WebFrom1. Then the property appeared 1 line of code equals many bugs. So don't write any!!

                          A Offline
                          A Offline
                          ake_krakbar
                          wrote on last edited by
                          #14

                          Hello Again Ista. If you could post the solution you are working with (or a link to it) here on this forum I would be very greatful.

                          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