Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Exampel documentation - Additional parameter #47

Open
MarkoEitel opened this issue Feb 14, 2017 · 5 comments
Open

Exampel documentation - Additional parameter #47

MarkoEitel opened this issue Feb 14, 2017 · 5 comments
Assignees
Labels
question Overall question and help
Milestone

Comments

@MarkoEitel
Copy link

Hello,
can you please give an exampel for using additional parameter?
I've read #41, #20 and #19 but i have no idea...

Greetings from Berlin
Marko

@sirfilipef
Copy link

+1. An example would help a lot. I have no idea how to implement it.

@flxqjx
Copy link

flxqjx commented Feb 21, 2017

+1 ,thanks!

@fabriciogs
Copy link

+1. This is a must have on the documentation. I'm struggling trying to send additional parameters using "data" inside ajax, but on C# controller my AdditionalParameters is always null.

@ALMMa
Copy link
Owner

ALMMa commented Mar 8, 2017

Check out this sample project wich enables both request and response additional parameters.

I'll improve this behavior for vnext. For now, you must enable additional parameters parsing on the options element and provide a model binder with the correct parsing function. That way your request will get populated with your additional parameters.

After enabling response additional parameters, simply use the overloaded CreateResponse method with the parameters (dictionary) to return and they will be available on the final json, along with other elements.

Hope this might help :)

@fabriciogs
Copy link

@ALMMa That worked for me, thanks a lot!

@ALMMa ALMMa self-assigned this Jun 17, 2021
@ALMMa ALMMa added the question Overall question and help label Jun 17, 2021
@ALMMa ALMMa added this to the 3.0.0 milestone Jun 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Overall question and help
Projects
None yet
Development

No branches or pull requests

5 participants