Sharepoint 2013 SPView does not bring all items and/or fields

i created a handler to bring me a view, so say i had this url for the view

to i sent my view the server relative url

and used it to open a new SPSite and SPWeb and get the items, yet i just couldn't get all my items.
yet when i tried by using the SPContext.Site it worked.

i dont know why, but the context of how the SPSite was opened affects the view.

my final code looks like this
using (SPSite tempSite = new SPSite(serverUrl + serverRelativeViewUrl))
    using (SPWeb getUrlWeb = tempSite.OpenWeb())
        spwebUrl = getUrlWeb.ServerRelativeUrl;

using (SPWeb tempWeb = spContext.Site.OpenWeb(spwebUrl))
    string viewUrl = item.MethodValue;
    if (viewUrl.StartsWith("/") == false)
        viewUrl = "/" + viewUrl;
    SPView oView;
    {        oView = tempWeb.GetViewFromUrl(viewUrl);
    catch (Exception viewEX)
    ...more code...


Popular posts from this blog

Asp.Net Ending Response options, Response.End() vs CompleteRequest()

c# Service Play Sound with NAudio example by Moshe

MatDatePicker Errors