Problem persisting asp.net 2.0 property in design-time

Ask a Question related to ASP.NET Building Controls, Design and Development.

  1. #1

    Default Problem persisting asp.net 2.0 property in design-time

    Hi!

    I have a asp.net 2.0 webcontrol with a property called TestProp (type:
    string), if i change value in the property-window in vs.net manually
    everything works fine. The value is persisted to the HTML-source.
    But if I connect a designer and change the value in code (opening the
    desigen from design-mode in vs.net), the value looks changed in the
    property-window but it is NOT persisted to the HTML-source.

    What am I doing wrong! I have tried everyting....

    /Jesper


    JesperA Guest

  2. Similar Questions and Discussions

    1. Issues Persisting Design time changes to page source
      I have a Control which I'm designing the LiteGrid which has two properties "Columns" and "Actions". These properties are in turn Collections of...
    2. using the Items property in the design time property window
      I hope this is the proper forum. I posted this problem in the wrong one previously. I have a custom server control that I am building. Implementing...
    3. Persisting control properties at design time
      Hi cpnet, Thanks for your feedback. I have seen your concern. I am currently doing research on this issue, which need some time. I will reply...
    4. Properties not persisting at design time.
      Guys Hope someone can help me! I'm having real problems getting properties I type against a control I have written at design time I have...
    5. Persisting Design-time generated value
      I want to add a property to a control that will contain a GUID. This GUID. Should be generated at design time, when the control is dropped onto...
  3. #2

    Default Re: Problem persisting asp.net 2.0 property in design-time

    Jesper,

    You will want to have the designer save the values you set in the
    Properties window and then set the values in the controls as you want
    to see them in Design Mode, and then restore the saved values.

    You can see an example of this in a control I created...

    [url]http://svn.offwhite.net/svn/SmallSharpTools.Messenger/trunk/ClassLibrary/Web/UI/Controls/ContactForm.cs[/url]

    Look for the GetDesignTimeHtml method near the bottom.

    Brennan Stehling
    [url]http://brennan.offwhite.net/blog/[/url]

    JesperA wrote:
    > Hi!
    >
    > I have a asp.net 2.0 webcontrol with a property called TestProp (type:
    > string), if i change value in the property-window in vs.net manually
    > everything works fine. The value is persisted to the HTML-source.
    > But if I connect a designer and change the value in code (opening the
    > desigen from design-mode in vs.net), the value looks changed in the
    > property-window but it is NOT persisted to the HTML-source.
    >
    > What am I doing wrong! I have tried everyting....
    >
    > /Jesper
    Brennan Stehling Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139