MVC HTML輔助類常用方法記錄

2021-06-27 22:29:43 字數 498 閱讀 4056

(1)@html.displaynamefor(model => model.title)是顯示列名,

(2)@html.displayfor(modelitem => item.title)是顯示列的內容

(3)@html.actionlink("create new", "create")是超連結,跳轉到model中的create頁面,引用的是controller中create方法;

(4)@html.actionlink("edit", "edit", new )編輯頁面;

(5)@using (html.beginform()) 用於客戶端驗證,其html.beginform()表示在本頁顯示

(6)@html.labelfor(model => model.time)標籤

@html.editorfor(model => model.time)編輯框

@html.validationmessagefor(model => model.time)驗證合法性錯誤顯示

MVC HTML輔助類常用方法記錄

1 html.displaynamefor model model.title 是顯示列名,2 html.displayfor modelitem item.title 是顯示列的內容 3 html.actionlink create new create 是超連結,跳轉到model中的create...

JUC 常用輔助類

public class countdemo string.valueof i start cd.await system.out.println thread.currentthread getname t班長離開教室 countdownlatch在初始化時傳入乙個數值,通過cd.countdow...

JUC 7 常用輔助類

減法計數器 public class countdownlatchdemo string.valueof i start countdownlatch.await 等待計數器歸零,然後再向下執行 system.out.println close door 原理 countdownlatch.coun...