简体   繁体   中英

Sharepoint web part POST

It's easy to create a hyperlink that passes parameters using GET by adding them to the URL:

http:\\somesite.com?name=fred

but the web service I'm connecting to uses POST. What's the best way to do this in Sharepoint?

OK, I'm not surprised there's no answer to this. I suspect I'm probably approaching this in the wrong way and not explaining it well.

I want to take the user's browser to a diffent page passing POST data, like a HTML form would. But in sharepoint you can't change the 'action=' - you can only post back to the same page - if I understand the page life cycle bit correctly.

I'll try adding a button to the web part and use it's onclick() to do a HTTP web request.

If you need to post data differently, adding a second form element to the page should work. It needs to be outside the SharePoint form, but adding another element outside that is easy enough with javascript/jQuery.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM