I am not sure where to post this question, but I thought that I would start here. I have a simple aspx page that work just fine. But when I try to go into design view (in the html editor) it gives me the attached error message. I found a tid on msdn here:
Are you looking at the html? There are a bunch of <% %> in there. Although I'm not sure what the trouble is as I can't reproduce the error off of just that page.
I'm a little confused. This looks like an old asp page, with one or two .net additions added to it. is that what the page is? the way you do the "checked" attribute for checkboxes might have worked in old asp, but not asp.net. if you wrap those tags used for determining the "checked" attribute in single ticks, it'll let that through to the designer but i think it's a lame hack(empty ticks are left in the input tag if it's not checked).
If it's an old asp page, i'd consider rewriting it from the ground up for asp.net OR keep it in it's original old asp form and take out the .net stuff. It doesn't look like you're adding much to that page with .net goodies anyway. however, since i'm only looking at one page of your project there's a pretty good chance that i might be missing something. if you're not doing anything funky with session state, then that page could remain an old asp page and still work like a champ in a .net solution(probably have to change the code in that usercontrol, to an asp file and include it or something.
Actually, it's just how this shop does things. They really use classic asp mixed in with some .net. I agree it doesn't make any sense. I switched that line, but still got the error any other suggestions?
Well, you'd have to update all of the lines to make that page work(including everything with the checkboxes). BTW, to debug that page I yanked out all code and added it section by section until i got an error, then isolated that code in a new page to make sure it was reproduceable(sp??).
My suggestion probably isn't going to work for you. Whoever put those lines in didn't do it through the designer, right(otherwise they would've received the same error you did)? so i'd say stay out of the designer(i've been doing webprojects in vs.net for almost 2 years and have not had a situation where i've needed that designer, it mucks up your html anyway) That's one suggestion. Another would be to figure out a way for the checked attribute to work using inline code. Start with an empty page and a checkbox input tag and figure out how to make it work with switching back and forth in the designer. I'd stick with the "stay out of the designer" suggestion, you'll get more work done, it's not really necessary. Maybe someone else has better solutions though.(oh and guide your fellow coders to stop mixing old asp techniques with the new stuff, make the jump!!you'll all be happier)