|
| Having problems with the designer file |
 |
Fri, 18 Jan 2008 05:40:32 +000 |
Guys,
I have been using the WebApplication Project. I have one project where when a
control is droped on to the page, it does not add the instance name into the
designer file. I don't know if any one has faced this issue. It doesn't matter
if I switch the view, the declaration is not going in. When I try to create an
event, it generating the event in the page itself rather than the code behind
file.
When I created a new WebApplicaiton Project, it works fine. I don't know how to
solve this issue.
Please advise,
Shrini
|
| Post Reply
|
| Re: Having problems with the designer file |
 |
Thu, 24 Jan 2008 02:32:43 +000 |
Hi Shrini,
From your description, I understand that in your web application project, drag
and drop a web control to web form does not update the corresponding designer
file. This issue does not exist in a new web application. If I have any
misunderstanding, please let me know.
Based on my experience, you probably need to check the "Page"
directive of the web form. If it does not point to the correct code behind file
(for example, I remove or change the value of CodeBehind and Inherits
attributes), this issue can be reproduced.
<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="test.aspx.cs" Inherits="WebApplication2.test"
%>
|
| Post Reply
|
| Re: Having problems with the designer file |
 |
Tue, 29 Jan 2008 11:07:21 +000 |
There is no issue with the code behind fine. After manually adding the items, I
am able to go forward.
In one of my another projects I noticed he same problem. In that project I have
a base UserControl class I am deriving the all WebUsercontrol code behind files
from.
Shrini
|
| Post Reply
|
| Re: Having problems with the designer file |
 |
Wed, 30 Jan 2008 17:52:50 +000 |
Maybe this will help. I have a web application project and I tried to add a form
and code-behind file to it by copying them from another project, which was not a
web application project. No matter what I did, I couldn't get the project to
recognize the form and code-behind file correctly. So no designer file was
created. I deleted the files within the vs 2005 project. Then I added a new form
to the project. Then I cut and pasted my other project's form logic into the
form. I did the same thing with the code-behind logic. Then when I saved the
form file, the designer file was updated properly.
Another thing I found that might be relevant is that somehow the designer file
got duplicate definitions for all of the objects in one of my forms. I had to go
into the designer and manually remove the duplicates before I could compile the
application. It looked like it wasn't defined. But really, it was defined twice.
I just wasn't reading the error messages carefully.
|
| Post Reply
|
|
|
|
|
|
|
|
|
|