Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: databind problem


Message #1 by "Rosie" <anirose_US@y...> on Thu, 24 Oct 2002 21:50:25
Hi guys 

how can I put one condition after calling databind() to read just the data 
which is belonged to the specific date.
in the below process, I can read the data but all of them ... I just wanna 
see the data for the specific date only.

how can I do that ?

	ManagersDB oManagersDB = new ManagersDB();
			DataTable dtDocs = oManagersDB.GetManagerDocs
(Convert.ToInt32(m_selCategories.SelectedItem.Value));
			
			//develop query string
			string sQuery = m_radSearch.SelectedItem.Value+" 
like '%"+m_txtSearch.Text+"%' and 
PostDate>'"+m_calAfter.SelectedDate.ToShortDateString()+"'";
			dtDocs.DefaultView.RowFilter = sQuery;
			
			//databind to realize query
			m_rptDocs.DataSource = dtDocs;
			m_rptDocs.DataBind()

  Return to Index