4
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by dnanetwork
0

A few things about your post
1) Use Code tags like this , if you didn't already know.
2) .NET is not a language, the language you are using is VB.
3) If you already know to program on .NET with VB its not too difficult to learn to do it in C#. Here is a starter.

0

If you know VB.net, then C# become simpler for you to learn. Some of the things you are used to doing in VB using the .Net frame work are still available in c# only the syntaxes are different. I have converted your code to C# for you so that you can compare and learn from it.

protected void seachMarks_Click(object sender , EventArgs e)
	   {

	          SchoolSystem.Controller systemmgr;
	   	 	
	   	DataSet myDS;
	   	
	   	try
	   	{
	   	myDS = systemmgr.GetMarkSubmissionList(courseid.Text, semester.Text);
	   		if(myDS.Tables[0].Rows.Count == 0)
	   		{
	   			FormMessage.Text = "No students in this course/semester.";
	   		}
	   		else
	   		{
	   			myDS.Tables[0].DefaultView.Sort = "Name ASC";
	   			MarkList.DataSource = myDS.Tables(0);
	   		    MarkList.DataBind();
	   		}
	   		
	   		 
	    }

    	     catch (Exception ex)
	   	{
	   		FormMessage.Text = ex.Message;
	   	}
	   }
    }
0

If you know VB.net, then C# become simpler for you to learn. Some of the things you are used to doing in VB using the .Net frame work are still available in c# only the syntaxes are different. I have converted your code to C# for you so that you can compare and learn from it.

protected void seachMarks_Click(object sender , EventArgs e)
	   {

	          SchoolSystem.Controller systemmgr;
	   	 	
	   	DataSet myDS;
	   	
	   	try
	   	{
	   	myDS = systemmgr.GetMarkSubmissionList(courseid.Text, semester.Text);
	   		if(myDS.Tables[0].Rows.Count == 0)
	   		{
	   			FormMessage.Text = "No students in this course/semester.";
	   		}
	   		else
	   		{
	   			myDS.Tables[0].DefaultView.Sort = "Name ASC";
	   			MarkList.DataSource = myDS.Tables(0);
	   		                MarkList.DataBind();
	   		}
	   		
	   		 
	     }

    	     catch (Exception ex)
	   	{
	   		FormMessage.Text = ex.Message;
	   	}
	   }
    }
0

you need to fire the select query.....when click search..at that time..

pass your search parameter and bind the datagrid...

i'm sure that will work...

hope it helps...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.