本文介绍了从页面加载事件中获取数据并在ASP.NET中的gridview上显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 您好, 我在页面加载事件中将一些数据存储到变量中。我在同一页面上有一个gridview,它从SQL数据库中获取数据。我想要的是在gridview中添加另一列,并使用Page Load事件中变量中的值填充它。 有什么办法吗?我想这样做是因为我正在计算一些会因日期变化而改变的东西,因此我想从页面加载中获取数据并用它填充gridview。 我尝试过: 搜索谷歌和其他论坛但找不到与此相关的任何内容。解决方案 Hello,I am storing some data into a variable at Page Load event. And I have a gridview in the same page which is getting data from SQL database. What i want is to also add another column in the gridview and populate it with the value in the variable from Page Load event.Is there any way for this? I want to do this because i am calculating something which will be changed with respect to change in date, so therefore i want to fetch data from page load and populate the gridview with it.What I have tried:Searched google and other forums but could not find anything related to this. 解决方案 这篇关于从页面加载事件中获取数据并在ASP.NET中的gridview上显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
11-03 03:14