How do I apply a condition on a grid view display in C#?

Mishaal F December 21, 2013
Pinterest Stumbleupon Whatsapp
Ads by Google

I don’t know where to start and how to explain but i’ll try …

I am working on project of database management system….. I am trying to make an interface for my database using C# (using Oracle database). My software is an admission system for a university.

I am having a problem in applying a condition on my grid view so that the only records will displayed in merit list of those students whose aggregate_marks are greater then 65% in the AGGREGATE_MARKS column,
table name=”STUDENT” column names=” AGGREGATE_MARKS” and others, database=Oracle.

Here is my source of the interface for the gridview and code is:

 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Web;
 using System.Web.UI;
 using System.Web.UI.WebControls;
public partial class view_merit_list : System.Web.UI.Page
 {
   protected void Page_Load(object sender, EventArgs e)
 {
}
   protected void Button1_Click1(object sender, EventArgs e)
 {
   Server.Transfer("~/project.aspx");
 }
 }

I also wrote a query for it but I don’t know how to use this to display its result in the C# gridview:

 select * from STUDENT
 WHERE (AGGREGATE_MARKS>65);

(REMEMBER I AM A BEGINNER ,software engineering student)

  1. Mishaal F
    December 21, 2013 at 11:53 am

    sorry for wrong description above
    this was what iactually wanted to say above

    I am working on database management system project….. I am trying to make an interface for my database using C# (with Oracle database). My database is of an admission system (for a university.)

    I want to apply a condition on my gridview so that the only those records should displayed in grid whose following condition is true
    only record of those students whose aggregate_marks are greater then 65% in the AGGREGATE_MARKS column of STUDENT table
    table name=”STUDENT” column names=” AGGREGATE_MARKS” and others, database=Oracle.