You must Sign In to post a response.
  • Category: Sharepoint

    User permission in sharepoint and .Net

    In my project for Document upload to sharepoint 2010 from asp.net., If the user present in Sharepoint 2010 the user can upload the document. If the user not present he can't upload the document.

    how to achive this?

    thanks
    sundhar
  • #753189
    Hi,

    As per your post first off all you should get the SharePoint user id and while upload time check the condition if user is present then insert otherwise show error message.


    string name=string.Empty;
    protected void Page_Load(object sender , EventArgs e)
    {
    name=SPContext.Current.Web.CurrentUser.Name;
    }
    protected void btnUpload_Click(object sender, EventArgs e)
    {
    if(name !=string.Empty)
    {
    //perform your upload action on here.
    }
    }


    Hope this will helpful to you....

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #753191
    Thanks i'll implement it naven :)


  • Sign In to post your comments