This project is read-only.

setfbml help

May 16, 2008 at 5:03 PM
hey there

im trying to load a user control into a user profile, ive tried using the code below, but it doesnt work. how abouts do i go about loading a user control into a users profile? i cant find any documentation on it all, im making my facebook app in c# and asp.net. everything else works ok, just doing the profile box is rather annoying

StringBuilder sb = new StringBuilder();
        StringWriter tw = new StringWriter(sb);
       
        HtmlTextWriter hw = new HtmlTextWriter(tw);
        Control c = LoadControl("~/Profile.ascx");
        Controls.Add(c);
        c.RenderControl(hw);
       
        Controls.Remove(c);
        string fbml = sb.ToString();
        FBService.SetFBML(fbml, "", "");