谁能帮我把这VB.net的代码转成C#,谢谢!
<Script Language="vb" Runat="Server">
sub Page_Load(Sender As Object,E As Eventargs)
Lb1.InnerHtml = now.date
BindGrid()
end sub
Sub Selected_Click(Sender As Object,E As Eventargs)
Lb1.InnerHtml = Calendar1.SelectedDate.ToShortDateString
BindGrid()
End Sub
Sub BindGrid()
Dim StrCnn As String
Dim Cnn As OleDbConnection
Dim dtcmd As OleDbDataAdapter
Dim dt As New DataTable
Dim Str1 As String
Dim remind_date As String
remind_date = Calendar1.SelectedDate.ToShortDateString
if Calendar1.SelectedDate.ToShortDateString = "0001-1-1" then
remind_date = now.date
end if
Str1 = "select * from art_info where addtime=#"&cdate(remind_date)&"# order by id desc"
StrCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("data.mdb")
Cnn = New OleDbConnection(StrCnn)
Cnn.Open()
dtcmd = New OleDbDataAdapter(Str1, Cnn)
dtcmd.Fill(dt)
DataGrid1.DataSource = dt
DataGrid1.DataBind()
Cnn.Close()
End Sub
</Script>