从应用程序所在的页面获取应用程序的价值

问题描述:

我们有一个部署在IIS服务器上的sharepoint提供商托管应用程序。应用程序正常运行并添加到页面中。

We have a sharepoint provider hosted app that is deployed on a IIS server. The app is running fine and added to the page.

现在我们在页面上有一个div有一些值,我们想在应用程序中读取该值并在应用程序中显示。

Now we have a div on the page which has some value and we want to read that value in app and show in the app.

我们还尝试将值存储在localstorage中然后读取它但它也没有用。

We also tried to store the value in localstorage and then read it but it also didn't worked.

有人可以帮忙吗?

如果div页面位于Provider托管应用程序中,然后您可以使用Jquery获取值,然后存储到SharePoint列表中。

If the div page is in the Provider hosted app, then you can get the value using Jquery and then store into a SharePoint list.

关于使用Jquery获取div值,请参阅:

About get div value using Jquery, please refer:

使用jquery获取div内容的值

将数据写入提供商托管应用中的列表:

Write data to a list in Provider hosted app:

将SharePoint写入操作添加到p rovider托管的加载项

谢谢

最好的问候