User personalized data and webpart
-
I have a webpart that displays the current weather using a zip code. Currently user has to provide zip code every single time the page loads. I wanted to save the zip code provided by the user so that my webpart can display the weather withouht user input. Would it be best to save the zipcode under user profile? Or does webpart save their information somewhere else? Thanks.
-
I have a webpart that displays the current weather using a zip code. Currently user has to provide zip code every single time the page loads. I wanted to save the zip code provided by the user so that my webpart can display the weather withouht user input. Would it be best to save the zipcode under user profile? Or does webpart save their information somewhere else? Thanks.
robert110 wrote:
Would it be best to save the zipcode under user profile? Or does webpart save their information somewhere else?
The WebPart can handle this by persisting the user input in its own personalization table, you can see the sample code from here[^]. http://msdn2.microsoft.com/en-us/library/z36h8be9.aspx[^]