i tried to get the current web using client object model.
i am not able to get that..please guide me to find it
I tried with the below code its not working..
ClientContext context = new ClientContext(ApplicationContext.Current.Url);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Current Web works only for the Server Side code that executes inside SharePoint context. When in ClientContext you can get the web you want using the below code, it gives you the web that is refered by the URL you mentioned in the ClientContext Class.