diff --git "a/\345\221\250\351\231\210\345\256\271/20241217-\346\225\260\346\215\256\345\272\2231.md" "b/\345\221\250\351\231\210\345\256\271/20241217-\346\225\260\346\215\256\345\272\2231.md" new file mode 100644 index 0000000000000000000000000000000000000000..88f28ee2880d158ba4ba23a710b5ad56ef69b294 --- /dev/null +++ "b/\345\221\250\351\231\210\345\256\271/20241217-\346\225\260\346\215\256\345\272\2231.md" @@ -0,0 +1,5 @@ +### +``` +1.keyword存在表明查找,使用该关键字去查找相应信息;不存在表明未查找,返回数据表数据 +2.判断keyword在不在,在就删除其可能存在的前后空格,否则就让其等于空字符串 +``` \ No newline at end of file diff --git "a/\345\221\250\351\231\210\345\256\271/20241226-\346\220\234\347\264\242\346\241\206\344\277\235\347\225\231\346\220\234\347\264\242\345\200\274.md" "b/\345\221\250\351\231\210\345\256\271/20241226-\346\220\234\347\264\242\346\241\206\344\277\235\347\225\231\346\220\234\347\264\242\345\200\274.md" new file mode 100644 index 0000000000000000000000000000000000000000..4d3485a900ad419bdd89e2998b69aed4889984df --- /dev/null +++ "b/\345\221\250\351\231\210\345\256\271/20241226-\346\220\234\347\264\242\346\241\206\344\277\235\347\225\231\346\220\234\347\264\242\345\200\274.md" @@ -0,0 +1,22 @@ +### 搜索框保留搜索值 +#### Model +```c# +public class SearchViewModel +{ + public string SearchTerm{get;set;} +} +``` +### Controller +```c# +[HttpPost] +public IActionResult Search(SearchViewModel model) +{ + return View(model); +} +``` +## View +```html +
+ +
+``` \ No newline at end of file