0

我有一个带有 2 个视图的 MultiView,其中有 EmpID。在 View2 中:我有技能(下拉菜单)作为添加到表 dbo.Emp_Skills 中的员工的技能

企业ID | 技能ID

如何保留 EmpID 的值,以便在下一个视图中可以将其添加到其他表中?

4

1 回答 1

1

By default it should retain selected value but if it is not doing so, you can manually place the value in ViewState object like ViewState["EmpId"]=EmpId; and then in next view you can access it like int empId = Convert.ToInt32( ViewState["EmpId"])

consider using asp.net wizard control in place of multiview in case of wizard kind of functionality.

于 2012-07-27T10:26:33.850 回答