I have created a search/results page in Dreamweaver 8 using ASP.NET that references a SQL database. Searches are done using HTML form.
The dataset that I have created in dreamweaver quite happily filters the results but the page is pulling back all entries in the database. Has anyone seen this before .. the code is as follows:
/* FORM CODE */
<form action="course_search_results.aspx" method="GET" id="Course Search" name="searchform">
<label> Course search</label>
<input name="searchbox" type="text" size="10" />
<input type="submit" value="go" />
</form>
/* asp.code /*
<%@ Page Language="VB" ContentType="text/html" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM:DataSet
id="rsresults"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_main") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_main") %>'
CommandText='<%# "SELECT * FROM dbo.cur_tblSessions WHERE sesTitle LIKE ?AND sesYear=" + Chr(39) + "08/09" + Chr(39) + " ORDER BY crsCode ASC" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@sesTitle" Value='<%# "%" + (IIf((Request.Form("searchform") <> Nothing), Request.Form("searchform"), "")) + "%" %>' Type="WChar" /></Parameters></MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
/*display code */
<ul>
<li><a href="course_search_results2.aspx?=<%# DataSet1.FieldValue("crsCode", Container) %>" title="Information on course: <%# DataSet1.FieldValue("sesTitle", Container) %>"><%# DataSet1.FieldValue("sesTitle", Container) %></a></li>
</ul>