Facebook like AutoSuggest texbox using jquery in asp.net - asp.net

I need to implement Facebook like AutoSuggest texbox using jquery in my asp.net application.
I googled a lot about this but only found PHP links :(
Any pointer or suggestion will be really helpful. thanks

Go through this link and download the autosuggestion file(jquery.fcbkcomplete.min http://www.emposha.com/ of jQuery

You don't really need a specific example of the server-side code, do you? I'd guess that using this page as a starting point, and using something like Fiddler to intercept the traffic from the page you should be able to figure out what is required on the back end... (clue : autocomplete_ajax.cfm expects a query parameter called q with the text entered from the form, and returns data in the format
Match1Name|Match1Id
Match2Name|Match2Id
)

Related

ASP.NET Web Forms - Manually Invoking a __doPostBack Call

I have a web forms page with a button that involkes a __doPostBack callback to the page. I would like to invoke this manually - by "manually" I mean from outside the webpage, for example by using wget. Is there a way or an example of the best way to do this, please?
No, it's not impossible to do this, although I'm not sure if it can be done with wget, becuse you have to set page variables using javascript, which wget won't support. You would most likely want to use something like perl or some other scripting language to post a postback with the correct variables set.
This is a non-trivial task, but it should be straight forward. open your web page, and look at the source. Then find the __doPostBack code and you should see how it works. Use something like Fiddler to view your postback variables. Then duplicate this on your "outside" code.
Rather looks like you can't do this, closing the Q
you can use something like WatIn http://watin.sourceforge.net/. Its not direcly intended for stuff like this, but can be used to programmatic click on buttons on a webpage.

Create an animated 'stack' via AJAX

I'm using ASP.NET for a search app web site.
My search retrieves exactly one result per fetch. Once the search is complete and the user selects "Update", a new result is fetched and the old result is written to the ViewState as a generic List. The new result replaces the old one.
I am trying to get the page to update (via partial post-back), so that the old result drops down the screen and the new result sits on top of it. Much like the concept of a stack.
Does anyone know how this can be achieved? I've started looking at the Ajax Control Toolkit.
Would appreciate any hints and tips with regard to my problem.
Thanks!
Using JQuery, this sort of things is fairly straightforward. I would suggest avoiding the partial post-back and using a WebMethod (on a "page method"), then calling that to get the results. In that scenario, JQuery can manage the request to the server and process the response data exactly how you wish.
I'm a just beginning to play around with AJAX animations, but this reference page has been a big help to me.
AJAX Animation Reference

How to post a purely HTML form via ASP.NET

When posting a form in ASP.NET, it adds container information to the request form keys
For example if you have a Textbox field with an ID of: txtFullName
It could end up posting something like this: ctl00_ContentPlaceHolder1_txtFullName
This is fine if you control the page where you are posting to but if you are posting to someone else's page or API then the form keys have to be exact.
I'm looking for an example of how to post a pure HTML for via asp.net or via code in vb.net/c#
TIA
in ASP.Net 4 you have the ClientIDMode="Static" :)
but if you are still not on 4
you can use this solution:
http://www.west-wind.com/Weblog/posts/4605.aspx
but you have to be careful with it.
so just inherit the control you want like textbox and override this properties
and you should get the result you wanted.

Sending VB data to another page in Javascript

I'm creating a search form using an asp:button control with the urlpostback set to a results page. The problem is, the asp:button uses Visual Basic and the search results from Google require Javascript.
Is there a way to take the data from an asp: textbox in VB and then send it to another page that uses Javascript and use the data?
You can always save the search results into a hidden form field, and set the page's form option to post to your "destination" page. From there, you can use your typical JavaScript methods to pull the data out of the posted form.
I'm not sure if it helps you but its worth a try:
http://www.google.com/support/forum/p/AdSense/thread?tid=2a9b892b35120b56&hl=en
You could try
Response.Redirect - and redirect to google.com with the search query appended (as a test I just manupulated the string in my browser and it seems to work. Look at the querystring parameter "q"
Try the google search api

How to implement A simple AJAX call using asp.net page?

I'm trying to implement this specific example using asp.net page instead of asp page.
If you look at the example you can see that there are 2 parts for the page:
Mail asp page. This page have JS code that calls other asp file for AJAX use.
the other asp page which holds the JS code.
The responseText of the call is the client side code, so, when I write something like this:
<html><head><title>test</title><script language="javascript" runat="server"
type="text/javascript">function test(){Response.Write("This is a Test!");
</script><body onload="test()"></body></html>
the page ignores my server side code and returns this:
<html><head><title>test</title><body onload="test()"></body></html>
what should I need to do to make him process my JS code and return its output?
Thanks in advance,
Oz Radiano.
asp.net does not process javascript server side, so setting the script tag runat=server with language="javascript" will be mostly ignored.
I think if you change it to "JScript" it will work, however, this has nothing to do with ajax.
"runat = server" says, preprocess this on the server and don't send it to the client.
If the language is a processable one it will be evaluated as well.
Try implementing the example after watching some videos from http://www.asp.net/learn/ajax-videos/ and http://www.asp.net/learn/ajax/
Its very easy to implement AJAX in asp.net then ASP. I can clearly give you the correct source code. :) But you seem to try out new things. Let us know how it goes!
Thanks for your responses, they made me understand that I'm not sure what my problem is.
After failing in implementing this exact example, I've googleed "how to run asp code using ajax"
this result returned and made it very clear.
Thanks again.

Resources