logo
  • 教程列表
  • SO官方文檔
  • 模型繫結
    • 上傳檔案
    • 防止在 PostModel 上繫結
    • 路由值繫結
    • 查詢字串繫結
    • 繫結到物件
    • Ajax 繫結
    • 基於通用會話的模型繫結
    • 使用模型繫結器使用動態格式手動驗證日期欄位
  1. StackOverflow 文件
  2. asp.net-mvc 教程
  3. 模型繫結
  4. 查詢字串繫結

查詢字串繫結

Created: November-22, 2018

要擴充套件路由繫結,請說你有一個像 https://stackoverflow.com/questions/1558902?sort=desc 這樣的網址

和 {controller=Home}/{action=Index}/{id?} 這樣的路由

public ActionResult Index(int? id, string sort){
     //sort would bind to the value in the query string, i.e. "desc"
}
  • 繫結到物件
  • 路由值繫結

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明