I want to make a Weather web part form any api. I have searched on Google but could not find any good solution. So, any link or suggestion or steps for that?

  • What version of SharePoint? With 2013's App Model, questions like this can be open to many different suggestions for solutions.
    – James Love
    May 18 '13 at 11:15
  • No,I am using SharePoint 2010. May 18 '13 at 13:12

Do you know how to build a basic web part? If not I suggest you learn this first. Here's a sample tutorial: http://msdn.microsoft.com/en-GB/library/ms415817(v=office.14).aspx

Next you want to learn how to develop against web services. Helpfully, Yahoo have a tutorial on how to deal with responses to web services as XML within C# applications: http://developer.yahoo.com/dotnet/howto-xml_cs.html. Yahoo have also documented their weather API: http://developer.yahoo.com/weather/

Hopefully with these two fundamentals you know enough .NET development already to fill in the gaps.

  • can i use same code for web application,windows mobile also? May 18 '13 at 13:14
  • You can if you abstract out the code that gets the data from the web service, and structures it.
    – James Love
    May 19 '13 at 19:03
  • Thanks.james.Done. but i want to ask one thing How can we Update Data of Curr. Temp in our Webart. May 20 '13 at 10:11
  • The best way you're going to want to do this is to have as much of the functionality of this in JavaScript - the web part emits JavaScript that will call the Yahoo API, process the returned result, and replace the area on screen with your processed & formatted results. If you do it this way, you can 'schedule' the whole process using JavaScript setTimeout() method, and have it repeat after a defined amount of time.
    – James Love
    May 20 '13 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.