Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [HttpGet]
- public JsonResult AddTextFile(string path)
- {
- if(string.IsNullOrEmpty(path))
- {
- // return error
- }
- }
- [HttpGet]
- public JsonResult AddTextFile(MyObject obj) {
- if(!ModelState.IsValid) {
- // return error
- }
- }
- public class MyObject {
- [Required]
- public string Path { get; set; }
- }
Add Comment
Please, Sign In to add comment