girish parganiha

girish parganiha

  • NA
  • 244
  • 17.6k

How to show data from search box ?

Dec 7 2016 7:26 AM
Hi
 
I create a search box in masterpage using textbox and button control and write the button code in masterpage. Now I want to show the search data in other webform page using detailsview control.
The problem is that it does not search the data.The code i use is-
 
{
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=Movieweb;Integrated Security=True");
SqlDataAdapter sda = new SqlDataAdapter("select * from Moviedb", con);
DataTable dt = new DataTable();
sda.Fill(dt); 
Response.Redirect("view.aspx");
 
Please help me.
 
Thanks. 
 

Answers (5)