call asp.net connect to mysql with ajax

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jarremw
    New Member
    • Jan 2008
    • 50

    call asp.net connect to mysql with ajax

    hello all, what i have is a modal popup control extender, i have an ajax script that saves the value of the two textboxes that are in the popup, what i am needing is a way to insert those values into my mysql database using ajax since the server side code will have already been executed, how would i go about doing this, i have read on the xmlhttprequest function but im not sure if that is what i need, in the modal pop up i have two textboxes and an ok and cancel button, on the ok button click i have it pointing to my ajax function which is working, i just dont know how to set up my mysql through ajax or call the asp.net through ajax, PLEASE HELP!!!

    thanks
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Originally posted by jarremw
    hello all, what i have is a modal popup control extender, i have an ajax script that saves the value of the two textboxes that are in the popup, what i am needing is a way to insert those values into my mysql database using ajax since the server side code will have already been executed, how would i go about doing this, i have read on the xmlhttprequest function but im not sure if that is what i need, in the modal pop up i have two textboxes and an ok and cancel button, on the ok button click i have it pointing to my ajax function which is working, i just dont know how to set up my mysql through ajax or call the asp.net through ajax, PLEASE HELP!!!

    thanks
    It sounds like you are using pure Ajax to do this.
    Are you using the Ajax Framework at all?
    It would probably help in understanding what you are doing if you posted some code to help explain your problem. Please remember to use [code] tags when posting code snippets.

    -Frinny

    Comment

    • jarremw
      New Member
      • Jan 2008
      • 50

      #3
      i am using the ajax control toolkit with vs2008, i cant post any code because im at work right now, but i do have my server side script working, the idea here is that when a user clicks on a link the modalpopup control shows with 2 textboxs and 2 buttons, user enters first and last name in the 2 boxes and hits ok, when ok is clicked i want to insert those two things into my db and also do a partial page postback to get the newly inputed items into a dropdownlist, i have the dropdown list postback working also with an update panel, so all i need is a way to connect to my db, then do a postback to the updatepanel

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Originally posted by jarremw
        i am using the ajax control toolkit with vs2008, i cant post any code because im at work right now, but i do have my server side script working, the idea here is that when a user clicks on a link the modalpopup control shows with 2 textboxs and 2 buttons, user enters first and last name in the 2 boxes and hits ok, when ok is clicked i want to insert those two things into my db and also do a partial page postback to get the newly inputed items into a dropdownlist, i have the dropdown list postback working also with an update panel, so all i need is a way to connect to my db, then do a postback to the updatepanel
        Put your Modal Popup control and your DropDownList into the same Update panel....Then in your "Ok" button click, update your database and repopulate the DropDownList.

        :)

        -Frinny

        Comment

        Working...