Autocomplete TextBox in ASP.NET

Posted by Nishadullas under ASP.NET on 7/26/2011 | Points: 10 | Views : 4598 | Status : [Member] | Replies : 5
I have created an Autocomplete Textbox in ASP.NET using C# and SQL SERVER 2005 as Database,(if i type a letter N then all the words with starting letter N will appear) and its working perfectly.
Now my requirement is if a particular word which does not exist in that particular collection of words starting from the letter N,
for ex:NISHAD does not exist in Table in Database and so it won't be in the collection of words,Now if i am writing the word in that textbox and at the end of a button click event i want that the word NISHAD should get saved in the Table in Database.
And from next time whenever i type the letter N in that textbox this word NISHAD should also appear.

NOw tell me how can i do this,i am little bit confused of to do this logically,culd you please help me with any ideas.

Thank you


Regards
Nishad




Responses

Posted by: SheoNarayan on: 7/26/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
What is the confusion Naimish. I think as soon as you are clicking on the button, call a method that will check for the word into the database table, if it exists then will not do anything otherwise insert the word into the table.

Are you looking for code?

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Nishadullas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nishadullas on: 7/26/2011 [Member] Starter | Points: 25

Up
0
Down
Thank you Sheo for replying..
I have already thought of this
but i am bit confused..because i am already firing a transaction on that particular button to save other details in Table and if i am writing a separate method to save the New text entered then let me tell you there are 8 AutoComplete textbox and i am confused that i have to do the same what you have suggested.
Will that slow down the process of saving the data..
This is my confusion.

Thank you

Regards
Nishad Ullaskumar

Nishadullas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: SheoNarayan on: 7/26/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Sometimes we underestimate the power of computers, I do n't think it will slow down. You can use a single stored procedure, write your insert statements of all 8 into that. I hope that should work fine without any performance issue.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Nishadullas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nishadullas on: 7/26/2011 [Member] Starter | Points: 25

Up
0
Down
Thank You Sheo...
Just needed a support and wasn't knowing whether i am doing it in the right way Thanx a lot ..

Thank You.

Nishad

Nishadullas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rgprakash06 on: 1/20/2012 [Member] Starter | Points: 25

Up
0
Down
send your complete code.....i ll clear ur doupt........

Nishadullas, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response