views:

573

answers:

4

Hi

I have used AJAXToolkit AutoComplete extender in my project.It works fines.But the issue is with the form of the page. when i type in the AutoComplete, i get list of suggestions.When i click on the page other than the Autocomplete, the form gets submitted. any suggestions how to stop submission of entire form whenever i click on the page?I use .net 2.0

+1  A: 

Does your TextBox have AutoPostBack="True" set? If so, it will automatically postback when you're "finished" (when the input control loses focus). If this is the case, just set it to false.

yeah,My TextBox AutoPostBack was set to true which i have changed it to false, now.but i have a url attached to each of my suggestions.On click of suggestion, user gets navigated to that particular url. When i do AutoPostback= "false", i wont get navigated to that page.HOw do i handle it?
A: 

yeah,My TextBox AutoPostBack was set to true which i have changed it to false, now.

but i have a url attached to each of my suggestions.On click of suggestion, user gets navigated to that particular url. When i do AutoPostback= "false", i wont get navigated to that page.

HOw do i handle it?

A: 

I think it would be as simple as adding a required validator to your element to see if the user selected anything.

Eric

epascarello
A: 

Use jquery to add an event handler that detects clicks. When a click occurs, stop the browser. Let me know if you need code.

craigmoliver