User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 423,566 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,649 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 198 | Replies: 0
Reply
Join Date: May 2008
Posts: 2
Reputation: nortcoll is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
nortcoll nortcoll is offline Offline
Newbie Poster

Results page not filtering in dreamweaver ASP.NET

  #1  
May 15th, 2008
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 */

  1. <form action="course_search_results.aspx" method="GET" id="Course Search" name="searchform">
  2. <label> Course search</label>
  3. <input name="searchbox" type="text" size="10" />
  4. <input type="submit" value="go" />
  5. </form>


/* asp.code /*

  1. <%@ Page Language="VB" ContentType="text/html" %>
  2. <%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
  3. <MM:DataSet
  4. id="rsresults"
  5. runat="Server"
  6. IsStoredProcedure="false"
  7. ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_main") %>'
  8. DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_main") %>'
  9. CommandText='<%# "SELECT * FROM dbo.cur_tblSessions WHERE sesTitle LIKE ?AND sesYear=" + Chr(39) + "08/09" + Chr(39) + " ORDER BY crsCode ASC" %>'
  10. Debug="true"
  11. >
  12. <Parameters>
  13. <Parameter Name="@sesTitle" Value='<%# "%" + (IIf((Request.Form("searchform") <> Nothing), Request.Form("searchform"), "")) + "%" %>' Type="WChar" /></Parameters></MM:DataSet>
  14. <MM:PageBind runat="server" PostBackBind="true" />


/*display code */

  1. <ul>
  2. <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>
  3. </ul>
Last edited by peter_budo : May 15th, 2008 at 7:26 am. Reason: Keep It Organized - please use [code] tags
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 6:49 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC