protected void CreateSurveyResponse() { string isFalk = (cbFalkNyhedsbrev.Checked)?"true":"false"; string isBilka = (cbBilkaNyhedsbrev.Checked) ? "true" : "false"; //setting token and host host = "https://restapi.surveygizmo.com/v2/survey/"; surveyId = "1014096"; surveyObject = "/surveyresponse?_method=PUT"; answer = GetDubaiAnswer(rblstQuestion.SelectedValue); name = "&data[56]=" + txtbName.Text; lastName = "&data[57]=" + txtbLastname.Text; mobil = "&data[58]=" + txtbMobil.Text; email = "&data[59]=" + txtbEmail.Text; terms = "&data[60][10135]=1"; falkNewsmail = "&data[60][10136]=" + isFalk; bilkaNewsmail = "&data[60][10137]=" + isBilka; authToken = "&user:[email protected]:" + CreateMD5Hash("70201950"); //create url surveyResonseUrl = host + surveyId + surveyObject + answer + name + lastName + mobil + email + terms + falkNewsmail + bilkaNewsmail + authToken; //send survey response dynamic surveyResponseResult = getObjectFromURL(surveyResonseUrl); if (surveyResponseResult.result_ok == true) { Response.Redirect("/thankyou.aspx"); //?-fjg pray all went well here - look Thomas is all ok or ? using (ServiceReference1.ContactFunctionsSoapClient ws = new ServiceReference1.ContactFunctionsSoapClient()) { try { ws.SubscribeFromQuiz(strBilkaUserName, strBilkaPassword, txtbName.Text + txtbLastname.Text, txtbEmail.Text, "dubaiquiz"); } catch (Exception exc) { string b = exc.ToString(); //Helper.SendErrorMail("Jfejl i Dansk Supermarked dubaiquiz: kald til subscribe Bilka newsletter webservice.", exc); } } } else { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "myscript", "<script type=\"text/javascript\">alert('hmm den gik ikke')</script>"); } }
protected void CreateSurveyResponse() { string isFalk = (cbFalkNyhedsbrev.Checked)?"true":"false"; string isBilka = (cbBilkaNyhedsbrev.Checked) ? "true" : "false"; //setting token and host host = "https://restapi.surveygizmo.com/v2/survey/"; surveyId = "1014096"; surveyObject = "/surveyresponse?_method=PUT"; answer = GetDubaiAnswer(rblstQuestion.SelectedValue); name = "&data[56]=" + txtbName.Text; lastName = "&data[57]=" + txtbLastname.Text; mobil = "&data[58]=" + txtbMobil.Text; email = "&data[59]=" + txtbEmail.Text; terms = "&data[60][10135]=1"; falkNewsmail = "&data[60][10136]="+isFalk; bilkaNewsmail = "&data[60][10137]=" + isBilka; authToken = "&user:[email protected]:" + CreateMD5Hash("70201950"); //create url surveyResonseUrl = host + surveyId + surveyObject + answer + name + lastName + mobil + email + terms + falkNewsmail + bilkaNewsmail + authToken; //send survey response dynamic surveyResponseResult = getObjectFromURL(surveyResonseUrl); if (surveyResponseResult.result_ok == true) { Response.Redirect("/thankyou.aspx"); //?-fjg pray all went well here - look Thomas is all ok or ? using (ServiceReference1.ContactFunctionsSoapClient ws = new ServiceReference1.ContactFunctionsSoapClient()) { try { ws.SubscribeFromQuiz(strBilkaUserName, strBilkaPassword, txtbName.Text + txtbLastname.Text, txtbEmail.Text, "dubaiquiz"); } catch (Exception exc) { string b = exc.ToString(); //Helper.SendErrorMail("Jfejl i Dansk Supermarked dubaiquiz: kald til subscribe Bilka newsletter webservice.", exc); } } } else { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "myscript", "<script type=\"text/javascript\">alert('hmm den gik ikke')</script>"); } }