I have 3 View
like this:
(我有3个这样的View
:)
public ActionResult Index()
{
return View();
}
public ActionResult Step2()
{
return View();
}
public ActionResult Step3()
{
return View();
}
And 3 HttpPost Actions
(和3个HttpPost动作)
//Step 1
[HttpPost]
[ValidateAntiForgeryToken]
public JsonResult Index(string number){}
//Step 2
[HttpPost]
[ValidateAntiForgeryToken]
public JsonResult Step2(string number){}
//Step 3
[HttpPost]
[ValidateAntiForgeryToken]
public JsonResult Step3(string number){}
For each HttpPost Action Method
I have created a HTML Form
and I want that the user submits each form step by step ( step 1
-> step 2
-> step 3
)
(我为每个HttpPost Action Method
创建了一个HTML Form
,我希望用户逐步提交每个表单( step 1
> step 2
> step 3
))
Everything is OK but I do not want users can go to redirect domain/controller/step2
or domain/controller/step3
.
(一切正常,但是我不希望用户可以重定向domain/controller/step2
或domain/controller/step3
。)
I mean, user must follow my router step 1
-> step 2
-> step3
(我的意思是,用户必须按照我的路由器step 1
- > step 2
- > step3
)
ask by Alex translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…