Wednesday, August 18, 2010

C# .net experts I need your help with datagrid?

I am not sure how to populate a table with data after clicking entering some text and click a search button.. i know how to do this in .net but eve after looking at examples I'm not sure how to do this in C#





this is what I have in .net but i need to find a way to do it in C# since the whole project will be in C#.


(i'm trying to learn C# )


is there another way to use ';Dim'; ?








protected Sub seachMarks_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles searchMarks.Click





Dim systemmgr As New SchoolSystem.Controller


Dim myDS As DataSet


Try


myDS = systemmgr.GetMarkSubmissionList(courseid鈥?semester.Text)


If myDS.Tables(0).Rows.Count = 0 Then


FormMessage.Text = ';No students in this course/semester.';


Else


myDS.Tables(0).DefaultView.Sort = ';Name ASC';


MarkList.DataSource = myDS.Tables(0)


MarkList.DataBind()


End If


Catch ex As Exception


FormMessage.Text = ex.Message


End Try


End SubC# .net experts I need your help with datagrid?
use this site http://www.developerfusion.com/tools/con鈥?/a>


to convert vb.net code to C#.Net

No comments:

Post a Comment