3

I just made an User Control with some parameters to be filled.

<uc1:Graph ID="uc1Graph" runat="server" property1="Name" property2="XValue" />

Now, my question is:

  • How to make the property1 be a required field?

The developer must fill the Name of graph(property1), otherwise it must not work and some error message should appear in runtime, ooor even better, in the design mode

Thank you for your time ! :D

Pellizon
  • 1,365
  • 2
  • 12
  • 26
  • 1
    When you say "some error message should appear" are you talking at design-time (hard) or run-time (easy)? – freefaller Apr 05 '13 at 18:16
  • i was thinking about design-time, but at run-time is enough – Pellizon Apr 05 '13 at 18:19
  • 4
    Possibly the answers [here](http://stackoverflow.com/questions/787473/flag-control-properties-as-required-in-design-view) and [here](http://stackoverflow.com/questions/5276874/asp-net-server-control-property-attribute-must-be-required) could help? – nkvu Apr 05 '13 at 18:31

0 Answers0