Can you set a "required attribute" on control property?

Discussion in 'ASP .Net Building Controls' started by Cameron Eckman, Feb 20, 2007.

  1. When creating a property for a server control can you set some sort of
    "required attribute", so that the developer sees the browser message you see
    when you leave off an attribute on a Microsoft control:

    Parser Error
    Description: An error occurred during the parsing of a resource required
    to service this request.
    Please review the following specific parse error
    details and modify your source file appropriately.
    Parser Error Message: The required attribute 'ContentPlaceHolderID' is
    not found on 'Content' control.
    Source Error:

    For right now I am just throwing HttpParseException during the Init, but
    that does not behave like Microsoft's controls.

    Thanks.
    Cameron
     
    Cameron Eckman, Feb 20, 2007
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.