public ActionResult ContollerToView() { using (var GetData = new SharedMemory.BufferReadWrite("Global\\YLKCom")) { TestData testdata; for(; ; ) { GetData.Read<TestData>(out testdata, 12); ViewBag.fstatues = testdata.fStatues; return View(ViewBag.fstatues); } } }在controller中实时获取变化的数据,然后通过viewbag实时传输到View视图中。但是必须要刷新页面传输的数据才会发生改变。问怎么样才能不刷新界面让view视图中显示的数据为controller实时读取的数据。
目前暂无任何回答
- 0 回答
- 2 关注
- 1228 浏览
添加回答
举报
0/150
提交
取消