James Posted January 23, 2003 Posted January 23, 2003 Has anyone ever lost part of their form? For some reason most of my web controls were lost. I don't know what cause this to happen. It has happened a few times in the past. If anyone know the answer please reply. I'm using VS.NET. Thanks, James Quote
*Experts* Nerseus Posted January 23, 2003 *Experts* Posted January 23, 2003 Can you define "lost"? Often times if you have some kind of scripting error, the page won't 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 Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
James Posted January 23, 2003 Author Posted January 23, 2003 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 Quote
Moderators Robby Posted January 23, 2003 Moderators Posted January 23, 2003 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. Quote Visit...Bassic Software
James Posted January 23, 2003 Author Posted January 23, 2003 My code behind or my presentation? I removed my code behind and my presentation did not fix itself. James Quote
Moderators Robby Posted January 23, 2003 Moderators Posted January 23, 2003 I'm guessing that most of the controls are placed on your form in the aspx page. Quote Visit...Bassic Software
James Posted January 23, 2003 Author Posted January 23, 2003 Yes, and that is were my control are missing. james Quote
Moderators Robby Posted January 23, 2003 Moderators Posted January 23, 2003 Well, start by commenting the code in chuncks and find the lines causing the errors. Quote Visit...Bassic Software
James Posted January 23, 2003 Author Posted January 23, 2003 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 I've recreated my presentation they did not disappear. I think it might be some type of bug. I've seen others mention the problem but have not found a solutions. James Quote
Codeless Posted February 4, 2003 Posted February 4, 2003 Is this a dead issue? I hope not. I have the same problem in fact I can't 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 doesn't 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. Quote Codeless ...it just goes on and on.
James Posted February 4, 2003 Author Posted February 4, 2003 It happened again after my last post. What I've 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 Quote
Moderators Robby Posted February 4, 2003 Moderators Posted February 4, 2003 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? Quote Visit...Bassic Software
James Posted February 5, 2003 Author Posted February 5, 2003 Just the ASP.NET debugging chckbox. Quote
Moderators Robby Posted February 5, 2003 Moderators Posted February 5, 2003 What I've 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 you're 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 I'll find the problem. Quote Visit...Bassic Software
Codeless Posted February 6, 2003 Posted February 6, 2003 I'm not even using the code behind yet, I'm simply drawing a button on my aspx and when I build, and run it doesn't show up. I guess it could be the same issue, but I don't get any error messages at all. Maybe I'll zip one up for you too. Is that ok? Quote Codeless ...it just goes on and on.
Moderators Robby Posted February 6, 2003 Moderators Posted February 6, 2003 yeah sure. Quote Visit...Bassic Software
Moderators Robby Posted February 6, 2003 Moderators Posted February 6, 2003 Your Zip did not contain a Web.config, I don't 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, here's a corrected version of your project. Let me know if it works.tvs.zip Quote Visit...Bassic Software
Codeless Posted February 6, 2003 Posted February 6, 2003 It didn't work, it is definately something to do with how this is set up. I did notice that when I create a new project it doesn't include all of the usual files that normally get created. In fact there aren't 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. Quote Codeless ...it just goes on and on.
Moderators Robby Posted February 6, 2003 Moderators Posted February 6, 2003 Is IIS running and did you create a virtual directory in IIS? Quote Visit...Bassic Software
Codeless Posted February 6, 2003 Posted February 6, 2003 yes Quote Codeless ...it just goes on and on.
Moderators Robby Posted February 6, 2003 Moderators Posted February 6, 2003 It sounds like the projects are not binding to the IIS. In control panel >> Add/Remove Programs >> then un-install "Microsoft .NET Framework" Then re-install the Framework. (It's on the .NET CD) Reason? It may be that the Framework was installed while the IIS was not running/installed. Quote Visit...Bassic Software
Codeless Posted February 7, 2003 Posted February 7, 2003 EUREKA!!! I reinstalled the .NET Framework and then I did an update which basically reinstalled the Visual studio again. Anyway its working now and I can see all my Web Controls. However, I still notice that when I create a new web project I don't get a web.config, global.asax, AssemblyInfo.vb, Styles.css, or a .vsdisco file by default. Should I? Quote Codeless ...it just goes on and on.
Moderators Robby Posted February 7, 2003 Moderators Posted February 7, 2003 Are you creating them in your wwwroot folder? Quote Visit...Bassic Software
Codeless Posted February 7, 2003 Posted February 7, 2003 I've actually tried to do it by creating a new virtual directory in IIS (under the wwwroot folder) and also by using the Start Page 'Create New Project' and specifying where to put it on the web server. But it always gets put into the wwwroot folder. Quote Codeless ...it just goes on and on.
Moderators Robby Posted February 7, 2003 Moderators Posted February 7, 2003 The easiest way is... Create a new project, then in Admin Tools >> Internet Services Manager >> click on Defult Web Site >> right-click your project name >> Properties >> Click on "Create". That's it Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.