protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int moduleId = int.Parse(Request.QueryString["moduleId"].ToString()); Module module = moduleBll.GetModuleById(moduleId); txtName.Text = module.ModuleName; txtIntro.Text = module.ModuleIntro; // Master.Description.Text = "修改版块"; (Master.FindControl("lbDescription") as Label).Text = "修改版块"; } }
// //GET: /Admin/Module/Edit/id public ActionResult Edit(int id, int pid = 0) { try { ModulesModel module = moduleBLL.GetModuleById(id); int take = 10; int skip = take * pid; module.PageID = pid; module.Current = pid + 1; ViewBag.c = module.PageID; if (module != null) { return(View(module)); } } catch (Exception e) { throw e; } Session["Error"] = "Record does not exist"; return(View(new ModulesModel())); }