Link to home
Start Free TrialLog in
Avatar of Andrew Crofts
Andrew CroftsFlag for Ukraine

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


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;
...

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of nikege
nikege

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Andrew Crofts

ASKER

the .aspx.designer.cs files are there but they are not connected to the .aspx and .aspx.cs.

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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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