PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

ASPXSearch in Master Form, how?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ASPXSearch in Master Form, how?

    (Forums: Searched)
    (FAQ: read)
    (Google: Searched)

    Hi all,

    I can't get search results to show up within a Form with runat=server on an ASP .NET Master page. The results show up just fine *outside* the form. Is there any way to fix this?

    Master Page snippet:
    <body>
    <form runat=server>
    <asp:ContentPlaceHolder ID="ph9" runat="server"></asp:ContentPlaceHolder>
    </form>
    </body>

    Search page snippet:
    <asp:Content ID="Content1" ContentPlaceHolderID="ph9" runat="Server">
    <ZoomASPX:ASPXSearch id="ASPXSearch" runat=server/>
    </asp:Content>

    As I said, if I move the ContentPlaceHolder outside of the form, it works great, but of course my layout is all wrong. Is there any way around this?

    Thanks!
    Paul

  • #2
    Content place holders are different. It doesn't allow you to use Response.Write to output where the aspxsearch control is, instead, you'd need to get the output and assign it to a text property.

    One way of doing this is using the CGI output as described here:
    http://www.wrensoft.com/zoom/support/aspdotnet.html

    Then you can assign zoom_results (the captured CGI output) to the text property of your control.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      I think I'm aaaalllllmost there!

      Review: My master page has 2 content blocks:
      Content1 is *inside* a Post Form.
      Content2 is outside that form.
      I want searching to happen inside Content1.

      I've followed the directions for implementing the CGI version as you described below, and the Response.Write portion works great (Search works, returns results, etc). Since Response.Write happens before either of the content blocks, everything's a-ok.

      There's still a problem - the minute I try to put that code inside Content1, (either the whole thing or by putting the code in codebehind and assigning zoom_results to an asp literal), I get no results. If I put it in Content2 it works great.

      I've done some investigating, and it looks like when I hit that Submit button, the RawUrl does NOT contain any querystring parameters. So somehow the querystring parameters are getting lost during postback. Could this have something to do with the fact that using Content1 results in nested forms, and Content2 does not? If so, is there any way to suppress the form that the Zoom CGI generates? Any other ideas?

      Thanks in advance

      Comment


      • #4
        You can turn off the search form from the "Search page" configuration window in Zoom and use the form given here.

        We will have improved postback support in V7.

        Comment

        Working...
        X