ASP.net (VS2005) - Auto Fill Text Box then post back after selection made

I have a TextBox and as the user types in the account number it will use a Web Service to look up the account number as they type it, once they make a selection I want to do a post back to get the information associated with that account and fill in other textboxes...like Name, Address, etc.

How can I do a post back after the user selects an account from the autofill?

Thanks,
Mark
smithmrkAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Najam UddinCommented:
You must be showing suggestion in some div, On click of div you call form submit, if your form Id is targetForm

$( "#targetForm" ).submit();

Open in new window

smithmrkAuthor Commented:
OK...not sure I totally understand, but I'm using the AJAX AutoCompleteExtender to fill the suggestions below the textbox...once the user selects the suggestion how can I post back?

Mark
Najam UddinCommented:
  protected void Page_Load(object sender, EventArgs e)
    {
        TextBox1_AutoCompleteExtender.OnClientItemSelected="getSelected";
    }

Open in new window


function getSelected()
    {
      $( "#targetForm" ).submit();
    }

Open in new window

OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

smithmrkAuthor Commented:
I'm getting Object Expected on this:

$( "#targetForm" ).submit();

Thanks,
Mark
Najam UddinCommented:
what is your form id?
smithmrkAuthor Commented:
Do you mean...MyPage.aspx?
Because I tried putting that in there and it still didn't work.

Mark
Najam UddinCommented:
in aspx <form runat="server"> give it an id and try using that id to submit the form.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
smithmrkAuthor Commented:
OK, Thanks!
I ended up just having the getSelected click a hidden button that seems to be working just as well.

I appreciate it!!!

Mark
smithmrkAuthor Commented:
Thanks!
Mark
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.