Exemplo n.º 1
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            if (ddSubDomains.SelectedIndex == 0)
            {
                responseRow.Visible   = true;
                txtResponse.Text      = "<h1>Wait...</h1><br/>Select a site first!";
                txtResponse.ForeColor = System.Drawing.Color.Yellow;
                return;
            }
            string SubDomain = ddSubDomains.SelectedItem.Text;
            string SiteURL   = ddSubDomains.SelectedItem.Value;

            SignUpController sign = new SignUpController();

            string Response = sign.SetAPIKey(SiteURL, SubDomain, txtKey.Text, txtSecret.Text);

            responseRow.Visible   = true;
            txtResponse.Text      = Response;
            txtResponse.ForeColor = Response.Contains("Error") ? System.Drawing.Color.DarkRed : System.Drawing.Color.DarkGreen;
        }