Instruction

In the new SharePoint App model, web parts are replaced with app parts. The problem is they don't have an equivalent to Web Part Connections. So how can you pass parameters from one part to another?

To answer this you have to consider several things:

This post explains about how to create an user defined custom property for a Client Web Part in SharePoint 2013 Provider Hosted App and its relationship with the query string and the standard tokens. The option for getting the data from Client Web Part's custom property is bit different from Farm based or Sandboxed Web Parts. In Provider Hosted App, the value of the property has to be accessed via query string.

Steps:

  1. Add Client web part to app part.

  2. Open element.xml and add one Property right click on Client web part, then Custom properties.



  3. Go to host web where you are having query string.

  4. Add App part.

  5. Add one script editor web part. It should be below to App.

    Code

  6. Now in the App landing page load read the Query string value in .Cs file.
    1. protected void Page_Load(object sender, EventArgs e)
    2. {
    3. string _ID = Request.QueryString["ID"];
    4. }