[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.buildingcontrols

Problem persisting asp.net 2.0 property in design-time

JesperA

10/17/2006 6:13:00 PM

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


1 Answer

offwhite

10/18/2006 6:14:00 PM

0

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...

http://svn.offwhite.net/svn/SmallSharpTools.Messenger/trunk/ClassLibrary/Web/UI/Controls/Cont...

Look for the GetDesignTimeHtml method near the bottom.

Brennan Stehling
http://brennan.offwhite...

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