CanvasFBMLBasePage errors with controls other than Label

Sep 19, 2007 at 7:04 PM
I have just switched to develop using the canvasfbmlbasepage and the sample is working fine. However, the second I add another control to the page other than label (in addition to the lblDashBoard and lblHelloWorld controls) I get a 500 error on facebook and my app reports this error:
Control 'ddlMarket' of type 'DropDownList' must be placed inside a form tag with runat=server
Control 'grid1' of type 'GridView' must be placed inside a form tag with runat=server

Of course, I had them placed inside the form tags and with runat=server just as the two labels from the sample are. I am succeeding in displaying the contents of the controls by attaching them to the labels, but it seems rather inefficient to me and since I am using some separate softward to do that other people must have a different way to avoid this problem.

Also, VS2005 nags me with underlining the asp in each asp control start tag, displaying "unrecognized tag prefix or device filter asp" as long as I don't have the form tag inside html and body tags. But if I add them, facebook won't accept the page output. Perhaps this is related to the other problem?

Thanks for looking this over!
Sep 21, 2007 at 6:52 PM
I can't even get the fbml example to work. I always get a 405 error. Did you have to do anything to set it up or did you just use the code as it was?
Sep 21, 2007 at 8:06 PM
The 405 shows up because when you access your fbml canvas page through facebook, facebook does a post to your page (with all those fb values telling you the user id and session etc.). Unfortunately, IIS 5 does not serve the default page on posts to a directory address (which you probably have in your call back url settings). You need to set the left navigation url and post-add url to your page and leave the directory address in the post back url field. This way, all posts will go to the right place.
Sep 21, 2007 at 8:11 PM
BTW: I did get rid of all the control errors. They are all working fine. I cannot say that I know why I had those errors, but between changing file names and closing and opening files and VS2005 it began to work again.

Two issues are left: the stupid underlining of all the tag prefixes as long as my form tag is not inside html and body tags is annoying me and objects in the data.sqlconnection namespace have to be declared with the full namespace despite the namespace being properly added to the application references. However, it is working now and I am about to start working for real on my application. (I am using verion 1.3 of the toolkit)
Oct 23, 2007 at 4:05 PM
THANK YOU for this post. I was able to workaround my dev issues by setting the nav URL to the default file and then getting rid of the filename in the callback URL. Thanks!