0
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Microsoft.VisualBasic;
public partial class ReportGeneration : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
DataSet query = (DataSet)Session["myDataset"];
GridView1.DataSource = query;
GridView1.DataBind();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
DateTime dt;
long age;
Datefunctions3.DateClass d1 = new Datefunctions3.DateClass();
//DateFunctions2.DateClass d1 = new DateFunctions2.DateClass();
if (e.Row.RowType == DataControlRowType.DataRow)
{
string s1 = e.Row.Cells[8].Text;
dt = Convert.ToDateTime(e.Row.Cells[8].Text);
// age = d1.DateDifference(da.Year, dt, DateTime.Now);
age = d1.DateDifference(DateInterval.year, d1, DateTime.Now);
e.Row.Cells[8].Text = age.ToString();
}
}
}
這是我的代碼,它顯示了dateinterval不能夠解決的問題下錯誤添加我的Visual Basic函數的DLL文件到bin文件夾以及如何導入視覺基本功能到asp.net
它顯示了什麼錯誤? – StriplingWarrior 2011-06-05 16:13:14
另外,什麼版本的VB,或者你的意思是VB.NET? – 2011-06-05 17:04:04