Visual Studio 2005 html-view does not recognize the generated html-tag of a custom control

R

Rolf Welskes

Hello,
this is a hint only.

If you make a custom control for example witch generates code

<div> ......</div>

and I put such a control in a page
then in html-view of the aspx-file
I could write

<p>
<c01:MyControl/>
</p>

generated I have:

<p><div>.....</div></p>
this is bad because I have a block-element (div) in a paragraph what seem
not to be good.

But when I am in VS html view and would write
<p><div> .... direktly I get red markers which says that is wrong.

If I take my control the error-systems does know nothing about the tag which
is generated from the control,

I think this problem also occures when I use ready to use controls
for example <p><asp:mytable> ....

I think in the next version of VS the VS-System should also see which tags
are generated from the control to
give error-hints to generate well formed html.

Remark: I work with Web-Projects, not with Visual Web Designer, so I have no
Validation of the html.

Thank you for recognize this problem for a better VS in the future.
Rolf Welskes
 
C

Cowboy \(Gregory A. Beamer\)

It is against the rules of strict XHTML, which is why you are getting
warnings. They are warnings, not errors. This does not mean you should not
clean them up, but they are not going to blow things up.

But, if you are outputting a <DIV>, you have no clue someone placed it in a
<p>, so there is nothing you can do from inside the control. You can write
up the "rules" for other developers, but they will ultimately have to follow
them. The only thing you can do is drop the <DIV>, but that likely blows up
your code, so you are back to living with what it does or having someone
clean up the tags in the ASPX page.
 
W

Walter Wang [MSFT]

Hi Rolf,

From your description, I understand that you wish the IDE would take the
custom control's generated html into account when validating the webform
source at design time.

Thank you for letting us know your suggestion. I strongly encourage you to
submit your feedback at
http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220 which
is monitored by our product team directly.

Sincerely,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top