viewstate只能够在同一个页面间用吗?如果要将数据传到另个页面怎么办?

immony 2003-10-17 09:16:42
我想将一个数组从一个页面传到另一个页面
请问怎么实现?
谢谢
我刚才搜索了一下viewstate,发现有人说它只能在同一页面中保存值。是吗?
...全文
63 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
immony 2003-10-17
  • 打赏
  • 举报
回复
数组是服务器端动态产生的。不是client side
513 2003-10-17
  • 打赏
  • 举报
回复
两页间传递常用方法:
1.Session
2.RequestString
3.HiddenField
ViewState不可能
saucer 2003-10-17
  • 打赏
  • 举报
回复
ViewState keeps the state of the page from last request, if you want to pass information around, you shouldn't use ViewState, there are other ways to do it, like Application/Session variables....see

Passing Values between ASP.NET Web Forms
http://www.dotnetbips.com/displayarticle.aspx?id=79

>>>将一个数组从一个页面传到另一个页面
what kind of 数组? client or server side? if it is a client side array, use its join method to form a string, post/pass to the other form and String's Split method to get back the list of values

62,047

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧