是否有方法通過相同的控制器動作一個接一個地顯示多個字符串?通過單個控制器動作在序列中呈現html
例如,我想在paraOne字符串加載並顯示在視圖上後顯示paraTwo字符串,在視圖上加載paraTwo之後的paraThree字符串等等。
Public ActionResult ChapterOne()
{
string paraOne = "This is paragraph one ";
string paraTwo = "This is paragraph two";
string paraThree = "This is paragraph three";
string paraFour = "This is paragraph four";
return View();
}
創建其持有的典範paraOne到paraFour字符串屬性。創建一個視圖並顯示您的段落...以您需要的順序 –
@uɐpuɐɥƆ對於可傳遞給視圖的字符串大小是否有限制? – user793468