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

Discussion in 'ASP .Net' started by Rolf Welskes, Oct 5, 2006.

  1. Rolf Welskes

    Rolf Welskes Guest

    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
     
    Rolf Welskes, Oct 5, 2006
    #1
    1. Advertising

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

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA
    http://gregorybeamer.spaces.live.com

    *************************************************
    Think outside of the box!
    *************************************************
    "Rolf Welskes" <> wrote in message
    news:...
    > 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
    >
    >
     
    Cowboy \(Gregory A. Beamer\), Oct 5, 2006
    #2
    1. Advertising

  3. 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 (, 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.
     
    Walter Wang [MSFT], Oct 6, 2006
    #3
  4. Rolf Welskes

    Rolf Welskes Guest

    Hello,
    yes you see it right, is a suggestion.
    Best Regards
    Rolf Welskes

    "Walter Wang [MSFT]" <> schrieb im Newsbeitrag
    news:S%...
    > 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 (, 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.
    >
     
    Rolf Welskes, Oct 6, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    1,218
    Alan Silver
    Jun 27, 2006
  2. rockdale
    Replies:
    1
    Views:
    651
    Juan T. Llibre
    Aug 23, 2006
  3. Nathan Sokalski
    Replies:
    6
    Views:
    361
    Mark Rae
    May 30, 2007
  4. Robert Smith
    Replies:
    2
    Views:
    1,262
    Juan T. Llibre
    Apr 27, 2008
  5. niberhate
    Replies:
    2
    Views:
    520
    niberhate
    Apr 24, 2010
Loading...

Share This Page