---
title: "What are the 2 ways of adding constraints to a route?"  
description: "What are the 2 ways of adding constraints to a route?"  
author: "Anonymous User"  
published: 2012-05-19  
updated: 2020-09-24  
canonical: https://www.mindstick.com/interview/1465/what-are-the-2-ways-of-adding-constraints-to-a-route  
category: "asp.net mvc"  
tags: ["asp.net mvc"]  
reading_time: 1 minute  

---

# What are the 2 ways of adding constraints to a route?

1. Use regular expressions\
2. Use an object that implements IRouteConstraint interface

## Answers

### Answer by Anonymous User

1. Use regular expressions\
2. Use an object that implements IRouteConstraint interface


---

Original Source: https://www.mindstick.com/interview/1465/what-are-the-2-ways-of-adding-constraints-to-a-route

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
