FBMLCanvasSample adding dropdownbox

Jun 5, 2009 at 2:32 PM

First of all, congrats on the nice work done here to provide an asp.net solution for facebook app dev.

Here's my problem:

 

I want to add a simple dropdownbox to sendsmiley.aspx ( or any other page for that mather) of the FBMLCanvasSample found in fbmlsample.zip. sendsmiley.aspx has a masterpage ~/FBMLMaster.Master.  (relevant code parts at the bottom of this post)

So i add  <font size="2" color="#0000ff"><font size="2" color="#0000ff">

<

</font></font><font size="2" color="#0000ff">

 

</font>

asp:listbox runat="server"></asp:listbox>

error message when i run it: "need a form tag with runat server around it" (didn' copy paste the exact error message as i presume your dutch is not that fluent ;)) 

so i comply:

 

 

 

<font size="2" color="#0000ff"><font size="2" color="#0000ff">

<

</font></font><font size="2" color="#0000ff">

 

</font>

form runat = "server">
<asp:listbox runat="server"></asp:listbox>
</
form>

 

 

next error message: "you can have only one form tag"

so whether i omit the form tag or not, i doesn't make any difference at the end.

help would be véry much appreciated. (really)

 

CODE:

FBMLMaster.master:

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="FBMLMaster.master.cs" Inherits="FBMLSample.FBMLMaster" %>

 

<asp:label runat="server" id="css" />
<asp:label runat="server" id="js" />
<asp:label runat="server" id="header" >
<fb:dashboard/>
<fb:tabs>
<fb:tab-item title="Public"  href="default.aspx" selected="<%=Convert.ToInt32(selected=="default") %>"/>
<fb:tab-item title="Home"  href="home.aspx" selected="<%=Convert.ToInt32(selected=="home") %>" />
<fb:tab-item title="My Smiles"  href="mysmiles.aspx" selected="<%=Convert.ToInt32(selected=="mysmiles") %>"/>
<fb:tab-item title="New Smiley"  href="newsmiley.aspx" selected="<%=Convert.ToInt32(selected=="newsmiley") %>"/>
<fb:tab-item title="Send Smiley"  href="sendsmiley.aspx" selected="<%=Convert.ToInt32(selected=="sendsmiley") %>"/>
</fb:tabs>

</asp:label>
<div id="main_body">

 

        <asp:ContentPlaceHolder ID="body" runat="server">

        </asp:ContentPlaceHolder>

       
</div>

 sendsmiley.aspx

 <%@ Page Language="C#"  AutoEventWireup="true" MasterPageFile="~/FBMLMaster.Master" CodeBehind="sendsmiley.aspx.cs" Inherits="FBMLSample.sendsmiley" %>
<%@ MasterType VirtualPath="~/FBMLMaster.Master" %>
<asp:Content runat="server" ID="content" ContentPlaceHolderID="body">
    <h2>Send a friend a smiley</h2>
        <form id="Form1" fbtype="multiFeedStory" action="<%=multiFeedHandler %>">
     
<div class="input_row">
<fb:multi-friend-input />
</div>
<asp:Label runat="server" id="grid" />
<input type="hidden" id="picked" name="picked" value="-1">
<div id="centerbutton" class="buttons">
<input type="submit" id="mood" label="Send Smiley"></div>

<asp:Panel Visible="false" ID="Panel1" runat="server">

<form id="Form2" runat = "server">
        <asp:listbox runat="server"></asp:listbox>
</form>

</asp:Panel>
<div id="emoticon"></div>

</asp:Content>

ps: yup idd, i haven't been into asp.net all that long ;)

Jun 5, 2009 at 2:33 PM

you can ignore the font tags, dont know where that came from

Jun 5, 2009 at 5:17 PM

looking at your code... you open a Form1 but never close it

 

 <h2>Send a friend a smiley</h2>
        <form id="Form1" fbtype="multiFeedStory" action="<%=multiFeedHandler %>">

so maybe if you fix this problem, and remove Form2, it might work.