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.
- Why is this happening?
- Can I disable automatic declaration and have everything be declared manually?
- Any other options to fix this?
Thanks in advance.
Goran Djuranovic 4 2625
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/subscripti...ult.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/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "Goran Djuranovic" <go**************@newsgroups.nospam> 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.
>- Why is this happening? - Can I disable automatic declaration and have everything be declared
manually?
>- Any other options to fix this? Thanks in advance. Goran Djuranovic
Hi Steven,
I understand what you are saying, and I kind of suspected that. But, I am
still not sure how the designer "knows" what controls I added manually (they
have the exact same code format as automatically added controls).
Here is what really happened. My project is a converted project (from 2003),
so all the controls used to be declared in code-behind. After conversion,
most of them got moved to designer.vb, but not all?! Now, when I moved the
rest of them to the designer.vb page, they got removed the next time I
changed some thing in .aspx page. When I say removed I mean totally missing
from both code-behind and designer.vb. So, now I have to have my
declarations in two different pages, which really sucks.
My questions:
- Is there a way to disable synchronization between the files (.aspx &
designer.vb)?
- How does the designer know which controls were automatically vs. manually
added (from some file or...)?
- Is there a way to revert to use only code-behind page?
Thanks a lot.
Goran
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:Le**************@TK2MSFTNGHUB02.phx.gbl...
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/subscripti...ult.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/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>>From: "Goran Djuranovic" <go**************@newsgroups.nospam> 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.
>>- Why is this happening? - Can I disable automatic declaration and have everything be declared
manually?
>>- Any other options to fix this? Thanks in advance. Goran Djuranovic
Thanks for your reply Goran,
For the further questions you mentioned, I'm afraid this synchronize is
necessary in the ASP.NET 2.0 web application project since it help ensure
the ASP.NET 2.0 page be correct (can be compiled correctly at runtime)
because ASP.NET 2.0 use a dynamic compilation model. For the VS 2005 IDE,
I haven't got the exact code logic of the webform designer in vs 2005 and
how to synchronize the html source and codebehind(designer.xx), but I think
it should look for all the toplevel controls in aspx template(which need a
member variable reference in page class) and generate one in the
designer.vb/cs file. Also, so far there is no project model that can work
exactly as VS 2003/ASP.NET 1.1 one in Visual Studio 2005, this is becaues
ASP.NET 2.0 application compilation model has changed and VS 2003/ASP.NET
1.1 one is not adoptable here.
For the problem here, I think there might be some certain control or the
structure of the aspx page template which make the IDE fail to generate all
the control member references. Is the page suffering the problem contains
only standard ASP.NET controls or can you repro the problem through a very
simple page with only standard controls? If so, you can provide me such a
page so that I can also perform some local tests.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "Goran Djuranovic" <go**************@newsgroups.nospam> References: <Oy**************@TK2MSFTNGP02.phx.gbl>
<Le**************@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: Visual Basic 2005 - designer.vb page problem Date: Fri, 31 Aug 2007 15:28:17 -0400
> Hi Steven, I understand what you are saying, and I kind of suspected that. But, I am still not sure how the designer "knows" what controls I added manually
(they
>have the exact same code format as automatically added controls).
Here is what really happened. My project is a converted project (from
2003),
>so all the controls used to be declared in code-behind. After conversion, most of them got moved to designer.vb, but not all?! Now, when I moved the rest of them to the designer.vb page, they got removed the next time I changed some thing in .aspx page. When I say removed I mean totally
missing
>from both code-behind and designer.vb. So, now I have to have my declarations in two different pages, which really sucks.
My questions: - Is there a way to disable synchronization between the files (.aspx & designer.vb)? - How does the designer know which controls were automatically vs.
manually
>added (from some file or...)? - Is there a way to revert to use only code-behind page?
Thanks a lot. Goran
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message news:Le**************@TK2MSFTNGHUB02.phx.gbl...
>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/subscripti...ult.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/subscripti...t/default.aspx.
================================================= =
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>>>From: "Goran Djuranovic" <go**************@newsgroups.nospam> 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.
>>>- Why is this happening? - Can I disable automatic declaration and have everything be declared
manually?
>>>- Any other options to fix this? Thanks in advance. Goran Djuranovic
Hi Goran,
Any further question on this? If so, please don't hesitate to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
> Thanks for your reply Goran,
For the further questions you mentioned, I'm afraid this synchronize is necessary in the ASP.NET 2.0 web application project since it help ensure the ASP.NET 2.0 page be correct (can be compiled correctly at runtime) because ASP.NET 2.0 use a dynamic compilation model. For the VS 2005 IDE, I haven't got the exact code logic of the webform designer in vs 2005 and how to synchronize the html source and codebehind(designer.xx), but I
think
>it should look for all the toplevel controls in aspx template(which need a member variable reference in page class) and generate one in the designer.vb/cs file. Also, so far there is no project model that can
work
>exactly as VS 2003/ASP.NET 1.1 one in Visual Studio 2005, this is becaues ASP.NET 2.0 application compilation model has changed and VS 2003/ASP.NET 1.1 one is not adoptable here.
For the problem here, I think there might be some certain control or the structure of the aspx page template which make the IDE fail to generate
all
>the control member references. Is the page suffering the problem contains only standard ASP.NET controls or can you repro the problem through a very simple page with only standard controls? If so, you can provide me such a page so that I can also perform some local tests.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>>From: "Goran Djuranovic" <go**************@newsgroups.nospam> References: <Oy**************@TK2MSFTNGP02.phx.gbl>
<Le**************@TK2MSFTNGHUB02.phx.gbl>
>>Subject: Re: Visual Basic 2005 - designer.vb page problem Date: Fri, 31 Aug 2007 15:28:17 -0400
>> Hi Steven, I understand what you are saying, and I kind of suspected that. But, I am still not sure how the designer "knows" what controls I added manually
(they
>>have the exact same code format as automatically added controls).
Here is what really happened. My project is a converted project (from
2003),
>>so all the controls used to be declared in code-behind. After conversion, most of them got moved to designer.vb, but not all?! Now, when I moved
the
>>rest of them to the designer.vb page, they got removed the next time I changed some thing in .aspx page. When I say removed I mean totally
missing
>>from both code-behind and designer.vb. So, now I have to have my declarations in two different pages, which really sucks.
My questions: - Is there a way to disable synchronization between the files (.aspx & designer.vb)? - How does the designer know which controls were automatically vs.
manually
>>added (from some file or...)? - Is there a way to revert to use only code-behind page?
Thanks a lot. Goran
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message news:Le**************@TK2MSFTNGHUB02.phx.gbl.. .
>>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/subscripti...ault.aspx#noti
f
>>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/subscripti...t/default.aspx.
================================================ ==
This posting is provided "AS IS" with no warranties, and confers no rights.
-------------------- From: "Goran Djuranovic" <go**************@newsgroups.nospam> 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. - Why is this happening? - Can I disable automatic declaration and have everything be declared manually? - Any other options to fix this? Thanks in advance. Goran Djuranovic
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John Timbers |
last post by:
I'd like to purchase Visual C# .Net for learning purposes only since it's a
lot cheaper than Visual Studio (note that I'm a very experienced C++
developer). Can someone simply clarify the basic...
|
by: Corrie Meyer |
last post by:
Announcement: SwiftReports standard edition 1.0 for Visual Studio
..NET 2003 released by UniSwift.
We are pleased to announce the first release of a fully-managed
reporting
tool for the...
|
by: Dr. Zharkov |
last post by:
Hello. To see the graphics of technology DirectX 9.0 SDK Update - June 2005
in project Visual Basic, WindowsApplication1 from Visual Studio 2005 Beta 1,
in file My Project, MyApplication.vb in a...
|
by: Crazy Cat |
last post by:
Hi,
I'm developing an application that is basically a VB.NET front end to a
SQL Server Express 2005 database -- right now I'm using VB.NET 2005
Express until my MSDN subscription gets delivered...
|
by: sqlguy |
last post by:
Why do we have to contact MS for a problem that has been with this
compiler from at least the beta of VS 20005. I am so sick and tired of
the 30 - 40 clicks it takes to dismiss VS when there is a...
| |
by: WT |
last post by:
Is it normal that Visual Studio sets the PreInit handler for a Page from the
OnInit code ?
No chance to fire it as OnPreInit is run befor OnInit.
???
CS
|
by: Nathan Sokalski |
last post by:
I am an ASP.NET developer, and Visual Studio 2005 seems to have stopped
declaring the controls that I add in the *.designer.vb files, therefore
forcing me to manually add them before I can use them...
|
by: Nathan Sokalski |
last post by:
Visual Studio 2005 recently stopped generating the *.designer.vb files for
my *.aspx and *.ascx files. I am using Service Pack 1, and do not believe I
did anything differently than normal prior to...
|
by: umeshj99 |
last post by:
Hi!
I am using SQL Server 2005 express edition as backend and Visual Basic 2005 express edition as frontend. This question is related to date comparison.
SELECT IssueDate, Client, ...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |