HighTechTalks DotNet Forums  

Problem persisting asp.net 2.0 property in design-time

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss Problem persisting asp.net 2.0 property in design-time in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
JesperA
 
Posts: n/a

Default Problem persisting asp.net 2.0 property in design-time - 10-17-2006 , 02:13 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



Reply With Quote
  #2  
Old   
Brennan Stehling
 
Posts: n/a

Default Re: Problem persisting asp.net 2.0 property in design-time - 10-18-2006 , 02:13 PM






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/SmallSha...ContactForm.cs

Look for the GetDesignTimeHtml method near the bottom.

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

JesperA wrote:
Quote:
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


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.