ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
uri too long, when use awe.open
Title:
B
I
{code}
?
I need to send big structure through awe.open, when i try use something like this awe.open(popupName, { params: params, tag: { cont: cell } }); I get error 414 (URI Too Long), is it possible to send parameters in the request body and not in the querrystring?
Save Changes
Cancel
Evgeny Alekseev
asked at 05 Jul 2019
you can set the parameters in the `InitPopup` like in this demo: https://demo.aspnetawesome.com/PopupDemo#Sending-client-side-parameters-to-server-on-content-load
at 05 Jul 2019
Omu
Okey, i try it, but get the same result. 414 (URI Too Long). `ParameterFunc` Also put params into querryString
at 05 Jul 2019
Evgeny Alekseev
Answers
B
I
{code}
?
right, that's because the popup get content request is a `get` and your parameters have reached the limit, you could try to make it a `post`, in `utils.js` find `awe.bfr = function (opt) {` and change the next line to this: if (opt.type !== 'post') { opt.type = 'post'; //return; } of course you could check for other `opt` parameters as well, but for now try the above
Save Changes
Cancel
Omu
answered at 05 Jul 2019
I get POST after refresh, and get params in body. Thx for help with this. I have a questions: 1. >of course you could check for other opt parameters as well, but for now try the above What other opt params i need to check? 2. I need pass `GridId` to `ParameterFunc`, any way to do this?
at 05 Jul 2019
Evgeny Alekseev
1. do a console.log(opt) to see the params 2. all the ways to send params are shown in the demo, link mentioned above please note from our demo that params set in InitPopup and the ones set in awe.open are merged and you get all of them in the controller, probably for you it would be easier to set the gridid param in the awe.open and leave the rest of them in InitPopup
at 05 Jul 2019
Omu
Thanks for the answers, I need to pass a GridId to the `ParameterFunc` function. For example, now specifying the function `ParameterFunc` looks like this: `.ParameterFunc("GetParamsForPopups")` I need something like `.ParameterFunc($"GetParamsForPopups({gridId})")`
at 05 Jul 2019
Evgeny Alekseev
here's an example: function f1(gridId){ return function(){ return { p1: gridId }; } } and use it like this: `.ParameterFunc("f1('grid1')")`
at 05 Jul 2019
Omu
Thank you, it works correct.
at 06 Jul 2019
Evgeny Alekseev
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK