Forums

This topic is locked

Results page not filtering in dreamweaver ASP.NET

Posted 16 Jun 2008 11:29:45
1
has voted
16 Jun 2008 11:29:45 Scott Cotterell posted:
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 the entries in the database and not
filtering. Has anyone seen this before .. the code is as follows:


any help would be very much appreciated !!


/* 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><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,­cultu
re=neutral" %><MMataSet
id="rsresults"runat="Server"IsStoredProcedure="false"ConnectionString='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRIN­G_mai
n" %>'DatabaseType='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATAB­ASETY
PE_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", "")
+ "%" %&gt;' Type="WChar" /&gt;&lt;/Parameters&gt;&lt;/MMataSet&gt;&lt;MM<img src=../images/fwzone/forum/icon_smile_tongue.gif border=0 align=middle>ageBind runat="server"
PostBackBind="true" /&gt;&lt;%@ Page Language="VB" ContentType="text/html" %&gt;
&lt;%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls"
Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,­cultu
re=neutral" %&gt;
&lt;MMataSet
id="rsresults"
runat="Server"
IsStoredProcedure="false"
ConnectionString='&lt;%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRIN­G_mai
n" %&gt;'
DatabaseType='&lt;%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATAB­ASETY
PE_main" %&gt;'
CommandText='&lt;%# "SELECT * FROM dbo.cur_tblSessions WHERE sesTitle LIKE ?AND
sesYear=" + Chr(39) + "08/09" + Chr(39) + " ORDER BY crsCode ASC" %&gt;'
Debug="true"
&gt;
&lt;Parameters&gt;
&lt;Parameter Name="@sesTitle" Value='&lt;%# "%" + (IIf((Request.Form("searchform"
&lt;&gt; Nothing), Request.Form("searchform", "") + "%" %&gt;' Type="WChar"
/&gt;&lt;/Parameters&gt;&lt;/MMataSet&gt;
&lt;MM<img src=../images/fwzone/forum/icon_smile_tongue.gif border=0 align=middle>ageBind runat="server" PostBackBind="true" /&gt;


/*display code */


&lt;ul&gt; &lt;li&gt;&lt;a href="course_search_results2.aspx?=&lt;%#
DataSet1.FieldValue("crsCode", Container) %&gt;" title="Information on course: &lt;%#
DataSet1.FieldValue("sesTitle", Container) %&gt;"&gt;&lt;%#
DataSet1.FieldValue("sesTitle", Container) %&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="course_search_results2.aspx?=&lt;%#
DataSet1.FieldValue("crsCode", Container) %&gt;" title="Information on course: &lt;%#
DataSet1.FieldValue("sesTitle", Container) %&gt;"&gt;&lt;%#
DataSet1.FieldValue("sesTitle", Container) %&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


Reply to this topic