Hi Goran,
Based on your description, I think you're using the VS 2005 SP1's "Web
Application Project" model for your ASP.NET application development,
correct?
If so, the behavior you encountered(manually declcared control member will
be removed after you add new controls onto webform) is the expected
behavior. This is because the VS IDE(webform designer) will always
synchronize the webform aspx tempalte with the codebehind(designer.vb or
designer.cs) whenever there is any change in the aspx template. When
performing the synchronizing, it will regenerate the page partial classes'
member control variables so as to match the aspx template. Therefore, if
you have any member variable that haven't an actual control (with the
identical ID to the member field name) in aspx , that member variable will
be removed. Does this explain your problem?
Also, designer.vb/designer.cs file is not designed to be edited by user
directly, if you have some custom properties/fields what to add on the
page, you should utilize the non-designer codebehind (pagename.vb file),
this file won't be modified by the IDE automatically. Is there any
particular concern that you can not use this?
If you have any further questions, please feel free to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "Goran Djuranovic" <
[email protected]>
Subject: Visual Basic 2005 - designer.vb page problem
Hi all,
I am experiencing a strange thing happening with a "designer.vb" page.
Controls I manually declare in this page are automatically deleted after I
drop another control on a ".aspx" page.