Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Building Controls / October 2006

Tip: Looking for answers? Try searching our database.

Problem persisting asp.net 2.0 property in design-time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JesperA - 17 Oct 2006 19:13 GMT
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 - 18 Oct 2006 19:13 GMT
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/ContactForm.cs


Look for the GetDesignTimeHtml method near the bottom.

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

> Hi!
>
[quoted text clipped - 8 lines]
>
> /Jesper

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.