Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Morten 20 posts 61 karma points
    Jan 31, 2012 @ 21:02
    Morten
    0

    Form input fields values has to much data for querystring

    well, maybee i over looked something here, but....

    I have a form with a alot input fields, some will, when the user have typed data, contain large amount of data.

    I use umbraco 1.4.7 and it seems that input values are put in the querystring, that cause a problem when the amount of data exceeds the max querystring length.

    I tryed using the Urlrewrite config to overwrite the parameters shown in the client browser but that dint work.

    any way to flag out the fields i dont need in the url?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 31, 2012 @ 23:42
    Jan Skovgaard
    0

    Hi Morten

    How are you trying to fetch the querystring? And what data are you fetching with it?

    /Jan

  • Morten 20 posts 61 karma points
    Feb 01, 2012 @ 00:26
    Morten
    0

    well im not trying to fetch the querystring actuelly, the hidden input fields are retrived in an extension using a simple HttpContext.Current.Request, but still data from the hidden input field are put in the url as a querystring parameter.

    since my data is from a canvas element it exceeds the querystrings limit and gives me an "

    The length of the query string for this request exceeds the configured maxQueryStringLength value."

    error before anything else happens in the code...

    bite from the url = ...&outputOne=%5B%7B"lx"%3A165%2C"ly"%3A87%2C"mx"%3A165%2C"my"%3A86%7D%...

    outputOne bening the hidden input fields id

     

    /Morten


  • Rodion Novoselov 694 posts 859 karma points
    Feb 01, 2012 @ 02:01
    Rodion Novoselov
    1

    Hi. Is it possible just to rebuild your form to make it use the POST method? The GET method isn't targeted to pass large form data and the limit that IIS imposes to the max length of a GET query string is relatively low (about 2K by default). However if you need to modify that limit in IIS 7 it can be done in the "request filtering" configuration of IIS (IIS Manager -> Request Filtering -> Edit Feature Settings).

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Feb 01, 2012 @ 09:20
    Jeroen Breuer
    0

    I think Rodion his suggestion is the best. If you use the POST method you could also try to create the form as a usercontrol with webcontrols which does a simple postback. This package has a demoproject which you could use: http://our.umbraco.org/projects/backoffice-extensions/digibiz-email-form-with-tinymce

    Jeroen

  • Morten 20 posts 61 karma points
    Feb 01, 2012 @ 12:11
    Morten
    0

    The form i allready set to post, and it does not explain why my values are in the querystring. 

    currently it is an xslt macro that produces the outcome for the page, im not sure why a usercontrol should do better or you mean just for testing?

     

    wrapped up a little test today, putting a static input field with a value on the page like so : <input type="hidden" value="test" name="trythis" /> and after an ajax postback my querystring has the parameter "&trythis=test" added to it...

  • Rodion Novoselov 694 posts 859 karma points
    Feb 01, 2012 @ 12:18
    Rodion Novoselov
    1

    It seems then that your ajax postback is misconfigured - what are you using for sending the form via an Ajax call?

  • Morten 20 posts 61 karma points
    Feb 01, 2012 @ 15:56
    Morten
    0

    whop, $.get(.. change to $.post(... and everything seemse to work out, thanks alot Rodion... sometimes you just cant see the forest for trees..

Please Sign in or register to post replies

Write your reply to:

Draft