And what happens if you specifically add the method="get" attribute to that tag? (I hardly ever use the server-side webform so wouldnt know how it affects your page).
XSLTsearch works with either method so you should be able to get it working, somehow.
Chriztian is quite right, you don't need a server-side form for XSLTsearch to work so you can remove the runat="server" portion of the <form> tag and save some viewstate overhead. He's also correct that you can use either action="post" (which uses form fields so you don't see anything on the querystring) or action="get" (whcih uses and displays urls with querystring values).
One last tid-bit... even if you're using action="post" (as I typically do) you can always manually supply a search term on the querystring and it will work. This is handy for emails, for instance, when you want to send a link to a specific search result. mydomain.com/search.aspx?search=JV would show results for 'JV'. Though if you're using action="post" you won't see the querystring used after the initial search. Still, handy though and I've found it quite helpful.
How to add the query string to the XSLTsearch results page URL
How can I add the query string to the XSLTsearch results URL?
When I click on the submit button, I would like the query string to display in the URL:
e.g /search-results.aspx?search=red
Can anyone help me out?
Cheers, JV
Hi JV,
Is the method set to 'get' on the form tag? (i.e. <form method="get"> )
/Chriztian
Hi Chriztian,
It's currently set in my template as <form id="form1" runat="server"> which on the front end the method sets to "post"
Hi JV,
And what happens if you specifically add the method="get" attribute to that tag? (I hardly ever use the server-side webform so wouldnt know how it affects your page).
XSLTsearch works with either method so you should be able to get it working, somehow.
/Chriztian
Hi, JV,
Chriztian is quite right, you don't need a server-side form for XSLTsearch to work so you can remove the runat="server" portion of the <form> tag and save some viewstate overhead. He's also correct that you can use either action="post" (which uses form fields so you don't see anything on the querystring) or action="get" (whcih uses and displays urls with querystring values).
One last tid-bit... even if you're using action="post" (as I typically do) you can always manually supply a search term on the querystring and it will work. This is handy for emails, for instance, when you want to send a link to a specific search result. mydomain.com/search.aspx?search=JV would show results for 'JV'. Though if you're using action="post" you won't see the querystring used after the initial search. Still, handy though and I've found it quite helpful.
cheers,
doug.
is working on a reply...