title: i try to pass data from controller to partial view in viewdata but it didn't work correctly
body: <p>I'm trying to pass data from my controller to a partial view using ViewData but it's not working correctly.</p>
  
  <h3>code in controller</h3>
  
  <pre><code>public PartialViewResult PartFace()
      {
  
          string message = "You are not connected to Facebook";
          string name = "";
          string appid = ConfigurationManager.AppSettings["AppID"];
          FacebookConnect fbConnect = new FacebookConnect();
          if (fbConnect.IsConnected)
          {
              message = "You are connected to Facebook";
              string token = fbConnect.AccessToken;
              token = HttpUtility.UrlDecode(token);
              Facebook.FacebookAPI api = new Facebook.FacebookAPI(token);
              JSONObject me = api.Get("/" + fbConnect.UserID);
          }
          ViewData["Message"] = message;
          ViewData["AppID"] = ConfigurationManager.AppSettings["AppID"];
          ViewData["Name"] = name;
          return PartialView();
      }
  </code></pre>
  
  <h3>code in partial view</h3>
  
  <pre><code>&lt;h2&gt;&lt;%: ViewData["AppID"]%&gt;&lt;/h2&gt;
  &lt;% if (!string.IsNullOrEmpty((string)ViewData["Name"])) { %&gt;
  &lt;h2&gt;Hello, &lt;%: (string)ViewData["Name"]%&gt; &lt;/h2&gt;
  &lt;% } %&gt;
  &lt;p&gt;
      &lt;fb:profile-pic uid="loggedinuser" facebook-logo="true" linked="false"&gt;&lt;/fb:profile-pic&gt;
      &lt;fb:login-button autologoutlink='true' onlogin='window.location.reload()' perms='read_stream,publish_stream,read_friendlists,user_activities'&gt;&lt;/fb:login-button&gt;
  &lt;/p&gt;
   &lt;div id="fb-root"&gt;&lt;/div&gt;
  &lt;script type='text/javascript'&gt;
      window.fbAsyncInit = function () {
          FB.init({ appId: '&lt;%= ViewData["AppID"] %&gt;', status: true, cookie: true,
              xfbml: true
          });
      };
      (function () {
          var e = document.createElement('script'); e.async = true;
          e.src = document.location.protocol +
        '//connect.facebook.net/en_US/all.js';
          document.getElementById('fb-root').appendChild(e);
      } ());
  &lt;/script&gt;
  </code></pre>
  
  <h3>code to call this partial in master page</h3>
  
  <pre><code>&lt;% Html.RenderPartial("~/Views/Home/PartFace.ascx"); %&gt;
  </code></pre>