Andrew Crofts
asked on
Controls from toolbox not recognised in code behind
I had a .net 1.1 asp.net application that I have opened up in VS2008. It was converted ok (no error messages)
If I add a control from the toobox the control is not recognised in the code behind.
I noticed in the code behind there are declarations for the existing controls. (see below)
If I add a declaration for my new control everything seem fine. I don't really want to have to do this and under 2.0+ are the controls defined somewhere else.
Can I get this to behave like a 2008 solution?
TIA
If I add a control from the toobox the control is not recognised in the code behind.
I noticed in the code behind there are declarations for the existing controls. (see below)
If I add a declaration for my new control everything seem fine. I don't really want to have to do this and under 2.0+ are the controls defined somewhere else.
Can I get this to behave like a 2008 solution?
TIA
public class NewsItems : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Panel Panel1;
protected System.Web.UI.WebControls.Repeater Repeater1;
protected System.Web.UI.WebControls.GridView GridView1;
...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Well it seems like a work around. To me the conversion from 1.1 didn't work properly
The newly created forms with the old code pasted in didn't seem to be any different from the originals but they seem to be working ok
The newly created forms with the old code pasted in didn't seem to be any different from the originals but they seem to be working ok
ASKER
What I have done is add a new page for each one and copied the code over. Just as well there are not too many.
It seems to me that the conversion from 1.1 hasn't been done properly