Lost part of my form

James

Well-known member
Joined
Oct 3, 2002
Messages
78
Has anyone ever lost part of their form? For some reason most of my web controls were lost. I dont know what cause this to happen. It has happened a few times in the past. If anyone know the answer please reply. Im using VS.NET.

Thanks,

James
 
Can you define "lost"? Often times if you have some kind of scripting error, the page wont render all of your controls. You used to have to use View Source on the browser, scroll all the way down to see an error message.

But maybe you mean something else?

-Nerseus
 
Maybe this is a better explanation. I work with a Web Form for a while and get it almost good to go only to find during a test that something has gone wrong (via an exception displayed in the browser). I return to the IDE and find that the web components have been removed from my form. Any help is appreciated.

James
 
As Nerseus said, it is an error in your code that will not allow the IDE to render the page.

Check all your code (a chunk at a time) and you should find the problem.
 
My code behind or my presentation? I removed my code behind and my presentation did not fix itself.

James
 
I ve recreate my presentation again. From what you stated above my web controls will disappear if I have an error in my code. However, after Ive recreated my presentation they did not disappear. I think it might be some type of bug. Ive seen others mention the problem but have not found a solutions.

James
 
Is this a dead issue? I hope not. I have the same problem in fact I cant even start a new project that is able to render the web controls in a browser (except for a label). I have two servers with .NET environment. One works correctly and the other doesnt render anything but HTML controls, and there are no errors appearing in the code.

If anyone has any information on this please post it. Thanks.
 
It happened again after my last post. What Ive notice is that when I went from my code behind to my presentation I got a messagebox stating some type of html error. After that some of my controls disappear. I got into the habit of backing-up my code. If my controls are lost I replace it with the back-up.

Hope someone find what is causing this problem and reply with a post.

James
 
Try this....

Right-Click on your project (in Solution Explorer) >> Properties >>
Configuration Properties >> Debugging ...

Near the bottom, in the Debuggers section there are 4 check boxes, Which ones are selected?
 
Originally posted by James
What Ive notice is that when I went from my code behind to my presentation I got a messagebox stating some type of html error. After that some of my controls disappear.
James this is because youre adding/declaring controls in some wrong manner within the code-behind. Or even some invalid properties in the designer.
If you want, Zip and post a corrupt project and Ill find the problem.
 
Im not even using the code behind yet, Im simply drawing a button on my aspx and when I build, and run it doesnt show up.

I guess it could be the same issue, but I dont get any error messages at all. Maybe Ill zip one up for you too. Is that ok?
 
Your Zip did not contain a Web.config, I dont know if you forgot to include it or not. Keep in mind that you need every file in the project folder when transporting it for other developers.
Anyway, heres a corrected version of your project.

Let me know if it works.
 

Attachments

It didnt work, it is definately something to do with how this is set up. I did notice that when I create a new project it doesnt include all of the usual files that normally get created. In fact there arent even references created. I figured the were somewhere in My Documents\Visual Studio Projects or something. I think I might need to do a reinstall. Thanks for the help.
 
Back
Top