SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm creating a edit view inwhich a user can create a article/document. In this edit view there are some fields that are required, but I can't see where you define that a field is required.

For example in a TextField, if this TextField has to be filled in how can you check that it is when the page is saved?



share|improve this question
up vote 0 down vote accepted

You could use the standard ASP.NET Validation Controls like the <asp:RequiredFieldValidator /> control.

<asp:TextBox ID="foo" runat="server"/>
<asp:RequiredFieldValidator ID="fooValidator" ControlToValidate="foo" 
     Text="Field foo is required." runat="server"/>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.