Try our conversational search powered by Generative AI!

Extra URL parameters are removed in Edit Mode


I've searched for an answer, and all I could find was this old case (from 2004) describing the same problem:

When using URL parameters, this works fine outside edit mode.

In edit mode, the URL is rewritten, and my custom parameters are discarded.

Anyone have a workaround or fix for this problem?

Jun 19, 2014 15:35

Hey Anders,

I remember seeing this in AlloyTech templates, they use Post instead of Get inside edit mode for search.

        @*We use GET to submit the form to enable bookmarking etc of search results.  However, as GET will remove other 
          query string values not in the form we can't use that in edit mode.*@
        @using(Html.BeginForm(null, null, Model.Layout.SearchPageRouteValues, PageEditing.PageIsInEditMode ? FormMethod.Post : FormMethod.Get))
            <input type="text" tabindex="1" name="q" value="@Model.SearchedQuery"/>
            <input type="submit" tabindex="2" class="btn" value="@Html.Translate("/searchpagetemplate/searchbutton")" disabled="@(Model.SearchServiceDisabled ? "disabled" : null)"/>

So, it seems it's by design, might be that you can make a similar workaround?

Jun 19, 2014 16:33

Thanx! We'll change to a POST then.

Jun 19, 2014 17:27
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.