C#,ASP.Net,gridview [英] C# , ASP.Net , gridview

查看:95
本文介绍了C#,ASP.Net,gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我是这个开发的新手。



我有一个sql表,我将html表存储在其中一个列中。此外,我在该表中有'startdate'和'enddate'列。

在网页中我使用gridview和binding(sqldatasource)这个表来显示我的html表很好,但我怎么能写出我的条件要显示此表仅15天,然后需要隐藏。

Hi I am new to this development.

I have a sql table and I am storing html table in one of the column. Also I have 'startdate' and 'enddate' columns in that table.
in web page I used gridview and binding(sqldatasource) this table to display my html table is fine but how can I write my condition to show this table only 15 days and then it need to be hide.

推荐答案

将当前日期存储在Web.Config文件中。

继续检查此日期。



根据日期编写显示/隐藏gridview的代码。

一旦差额达到要求的金额,隐藏gridview。
Store the current date in the Web.Config file.
Keep checking against this date.

Write code to show/hide gridview based on date.
Once the difference is the required amount, hide the gridview.


你应该创建一个商店程序来获得你想要的东西(只有15天的数据),然后将它绑定到gridview。

你可以参考google。
You should create a store procedure to get what you want (only 15 days data), then binding it to gridview.
You can refer to google.


这篇关于C#,ASP.Net,gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆