I'm using the AJAX Twitter control (for the first time :-)) I am using the Search feature. I would like to have the Twitter control display tweets that the user searchs for. I have a textBox and a Button inside of a MultiView, with the textBox and button being one View, and the Twitter Control being the other View. I cannot seem to format my query to the Twitter API in the correct format. I am having trouble. I looked at the documentation on Twitter, but the problem seems to be in mt ASPX pages html. I have this:
<ajaxToolkit:Twitter ID="Twitter1" runat="server" Mode="Search" Width="100%" IncludeReplies="false" IncludeRetweets="false" Count="5" BackColor="White" Search="http://search.twitter.com/search.json?q=%23" + (encodeURIComponent(txtTweets.Text) ForeColor="DimGray" IsLiveContentOnDesignMode="True" ><EmptyDataTemplate> There are no matching tweets.</EmptyDataTemplate><LayoutTemplate><div id="Div1" runat="server" class="ajax__twitter_header"><img src="images/twitter-bird-callout.png" alt="twitter bird" /></div><ul id="Ul1" runat="server" class="ajax__twitter_itemlist" style="margin:0px; background-color: White;"><asp:PlaceHolder runat="server" ID="ItemPlaceholder"></asp:PlaceHolder></ul><div id="Div2" runat="server" class="ajax__twitter_footer"></div></LayoutTemplate></ajaxToolkit:Twitter>
For my Search I am doing this:
Search="http://search.twitter.com/search.json?q=%23" + (encodeURIComponent(txtTweets.Text)
The reason for the %23 is That I am searching by Hash Tags, and Twitter Search appends this to the front of the querystring. I am getting an error on this part:
(encodeURIComponent(txtTweets.Text)
The error says:
Validation(ASP.NET)This attribute name must be followed by an equal sign(=)and a value.If the value is in the quotation marks the quotation marks must match.
Does anyone know the proper way to construct this search query in the Twitter control??