Passing values from a class to a method of another class
<p>I am creating a website. The home page has a text box and drop down box in which the user enters the movie name and language to search. When the user clicks on the Search button the search result page is displayed and the results of search should be displayed in a data grid. I created session variables to pass the text of the text box and data grid to be used in the other page. The code to fetch data from the database is in a class how do i pass the values received from the database to a method of another page? This is the code i have written, it doesn't give any errors but the data grid does not get filled with results what am I doing wrong?</p>

<pre><code> //Code for search button in home page
 protected void Btnsearch_Click(object sender, EventArgs e)
    {
        Response.Redirect("SearchResults.aspx");
        Session["moviename"] = TextBox3.Text;
        Session["language"] = DropDownList1.Text;
    }

 //Code to fetch data from database 
 public class movie
   {
    public SqlDataAdapter searchmovie(object moviename, object language)
    {
        connection.con.Open();
                SqlDataAdapter adapter1 = new SqlDataAdapter("select 
                               select movieName,language,director,price from movie    
                                         where moviename = '" + moviename + "' and 
                                         language = '" + language + "'", 
                return adapter1;

}
  }

  //Code in search page to fill data grid with search results
      public partial class SearchResults : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       movie m = new movie();
       SqlDataAdapter movieDetails = m.searchmovie(Session["moviename"],   
                                     Session["language"]);
       DataSet data = new DataSet();
       movieDetails.Fill(data, "movieD");
       GridView1.DataSource = data.Tables["movieD"];
       GridView1.DataBind();
    }
}
</code></pre>
