08.08.2017 Views

designer

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using ASP.NET Validation Controls 471<br />

10. In the Toolbox task pane, double-click RangeValidator.<br />

The ASP.NET validation control appears to the right of the Impressions text box.<br />

11. Click RangeValidator to show the control’s properties in the Tag Properties task<br />

pane. In the Tag Properties task pane, under Appearance, in the cell to the right<br />

of ErrorMessage, type Enter a value from 1 to 100 that represents how likely it is<br />

that this advertisement logo will display in relation to other ads.<br />

12. Under Behavior, in the ControlToValidate list, click ff5_new. Enter 100 in the<br />

MaximumValue cell, enter 1 in the MinimumValue cell, and then select Integer<br />

from the Type list.<br />

Save<br />

13. On the Quick Access Toolbar, click Save. In the Navigation pane, under Site<br />

Pages, right-click Untitled_1.aspx, click Rename, type NewAd.aspx, and then<br />

press Enter.<br />

14. Press F12 to preview NewAd.aspx in the browser.<br />

15. In the NavigateUrl text box, type www.nosite, and then click TAB.<br />

The insertion point moves to the Keyword text box, and the message Enter the<br />

valid URL for the Advertiser’s Web site appears.<br />

16. In the Impressions text box, type none, and then click Save.<br />

Two other error messages appear.<br />

Tip The space to the left of the Enter the valid URL error message is for the error<br />

message associated with the NavigateUrl RequiredFieldValidator control. You can hide<br />

the space by setting the Display property of the RequiredFieldValidator control to<br />

Dynamic.<br />

CLEAN UP Leave SharePoint Designer open if you are continuing to the next<br />

exercise. Close any open pages and browser windows.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!