none
JQuery/ Jscript AJAX to record data automatically for every textfield when it is filled without refreshing the whole page

    Question

  • Hi All,

    I am using Visual Studio 2010, asp.net, C# and SQL Server.

    1. I have a webforms with the following Text Field ID: PersonID, FavFood, FavDrink

    2. I have an mdf file, titled Test.MDF

    3. The table to record the data called "participant" with the following column name:

              a. PID

              b. QuID

              c. Data

              d. TimeEntered

    4. I want an ajax to perform the following:

              a. when the user key in 555 in personID textfield at 5:06pm 23 January 2012, it will record the data automatically in the participant table

    (PID = 555, QuID=null, Data= null, TimeEntered="23 January 2012 5:06pm" without refreshing the whole page / page load.

              b. when the user key in "fried Chicken" in Favfood textfield, it will record the data automatically in the participant table at 23 January 2012 5:07 pm

    (PID=555, QuID=FavFood, Data=fried Chicken, TimeEntered="23 January 2012 5:07pm" without refershing the whole page/ page load.

              c. when the user key in "Coca Cola" in FavDrink textfield, it will record the data automatically in the participant table at 23 January 2012 5:10 pm

    (PID=555, QuID=FavDrink, Data=Coca Cola, TimeEntered="23 January 2012 5:10pm" without refershing the whole page/ page load.

    In real life, I have 100 textfield to be automatically recorded, therefore I can't refresh/ reload the whole page once every textfield data is changed. It will waste too much time. I heard ajax should be able to fix this. Can someone please help how to do it? Thanks in advanced.

     


    • Edited by JayNoob Friday, February 03, 2012 8:47 AM
    • Moved by Leo Liu - MSFT Tuesday, February 14, 2012 5:10 AM Off-Topic (From:JScript for the .NET Framework)
    Thursday, February 02, 2012 11:05 AM

All replies

  • Actually, you should start with examples on the web that is with refreshing the whole page / page load, then replacing the submit function with jQuery.ajax() method.

    I'm sorry, I'm too lazy to search examples and glue them together for you, but somehow I believe there's example that have glued together but I'm too lazy to confirm those example exist too.

    Monday, February 06, 2012 3:38 AM
  • Hi JayNoob,

    For ASP.NET development problems you should close this thread and post in the ASP.NET Forum for dedicated support.
    Thanks for your understanding.

    Have a nice day,

    Leo Liu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, February 09, 2012 10:40 AM