Click here to Skip to main content
15,867,308 members
Home / Discussions / C#
   

C#

 
AnswerRe: creating a webservice problems Pin
Christian Graus2-Aug-07 21:52
protectorChristian Graus2-Aug-07 21:52 
GeneralRe: creating a webservice problems Pin
Daniel_Logan2-Aug-07 22:35
Daniel_Logan2-Aug-07 22:35 
GeneralRe: creating a webservice problems Pin
Christian Graus2-Aug-07 22:38
protectorChristian Graus2-Aug-07 22:38 
GeneralRe: creating a webservice problems Pin
Daniel_Logan2-Aug-07 23:02
Daniel_Logan2-Aug-07 23:02 
GeneralRe: creating a webservice problems Pin
Christian Graus2-Aug-07 23:09
protectorChristian Graus2-Aug-07 23:09 
GeneralRe: creating a webservice problems Pin
Daniel_Logan2-Aug-07 23:11
Daniel_Logan2-Aug-07 23:11 
GeneralRe: creating a webservice problems Pin
Christian Graus2-Aug-07 23:23
protectorChristian Graus2-Aug-07 23:23 
GeneralRe: creating a webservice problems Pin
Daniel_Logan2-Aug-07 23:46
Daniel_Logan2-Aug-07 23:46 
the error said it was an invalid method... i dont know why
this is the code behind:
//////////////////////////////////////////////////
using System;
using System.Collections;
using System.Data;
using System.Data.OleDb;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


public class CreateAccountCodeBehind : Page
{
protected TextBox FirstNameTB; //declaring the objects that are used within the aspx page and need coding
protected TextBox SurnameTB;
protected TextBox IDTB;
protected TextBox AddressTB;
protected TextBox ContactNumTB;
protected TextBox EmailAddTB;
protected TextBox PasswordTB;
protected TextBox ConfirmPasswordTB;
protected TextBox AnswerTB;
protected DropDownList QuestionList;

public void Submitbtn_Click(object sender, EventArgs e) //creating the new instance of the webservice and using the correct parameters
{
string First = FirstNameTB.Text;
string Surn = SurnameTB.Text;
string ID = IDTB.Text;
string Add = AddressTB.Text;
string con = ContactNumTB.Text;
string em = EmailAddTB.Text;
string pa = PasswordTB.Text;
string qu = QuestionList.SelectedItem.Text;
string an = AnswerTB.Text;
CreateAccountService SignUp = new CreateAccountService();
SignUp.Sign(First, Surn, ID, Add, con, em, pa, qu, an);
Response.Redirect("LoginPage.aspx");
}

public void ClearBtn_Click(object sender, EventArgs e) //clearing all user-entered fields
{
FirstNameTB.Text = "";
SurnameTB.Text = "";
IDTB.Text = "";
AddressTB.Text = "";
ContactNumTB.Text = "";
EmailAddTB.Text = "";
PasswordTB.Text = "";
ConfirmPasswordTB.Text = "";
AnswerTB.Text = "";
}

}
////////////////////////////////////////
this is the amsx:
//////////////////////////////////////
<%@ WebService language="C#" Debug="True" class="CreateAccountService" %>

using System;
using System.Web.Services;
using System.Xml.Serialization;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Collections;

[WebService(Namespace="http://localhost/LocalWebServices/")]
public class CreateAccountService : WebService
{

OleDbConnection conn;

public CreateAccountService()
{
conn = new OleDbConnection(@"provider=Microsoft.JET.OLEDB.4.0;
data Source = c:\\LocalWebServices\\Bank.mdb");
conn.Open();

}
[WebMethod]
public void Sign(string FName, string Sname, string IDNum, string address, string ContactNum, string email, string pass, string secretQ, string answer)
{
OleDbCommand cmd = conn.CreateCommand();
cmd.CommandText = "INSERT INTO Customers (FirstName,Surname,IDNumber,Address,ContactNumber,EmailAddress,Passwrd,SecretQuestion,Answer) VALUES ('" + FName + "','" + Sname + "','" + IDNum + "','" + address + "','" + ContactNum + "','" + email + "','" + pass + "','" + secretQ + "','" + answer + "')" ;
cmd.ExecuteNonQuery();
conn.Close();
}
}
GeneralRe: creating a webservice problems Pin
Albu Marius3-Aug-07 0:00
Albu Marius3-Aug-07 0:00 
GeneralRe: creating a webservice problems Pin
Albu Marius3-Aug-07 0:10
Albu Marius3-Aug-07 0:10 
GeneralRe: creating a webservice problems Pin
Daniel_Logan3-Aug-07 0:35
Daniel_Logan3-Aug-07 0:35 
GeneralRe: creating a webservice problems Pin
Albu Marius3-Aug-07 0:44
Albu Marius3-Aug-07 0:44 
GeneralRe: creating a webservice problems Pin
Albu Marius3-Aug-07 0:54
Albu Marius3-Aug-07 0:54 
QuestionBase Class Constructor on Inheritance Pin
N a v a n e e t h2-Aug-07 21:14
N a v a n e e t h2-Aug-07 21:14 
AnswerRe: Base Class Constructor on Inheritance Pin
Christian Graus2-Aug-07 21:21
protectorChristian Graus2-Aug-07 21:21 
GeneralRe: Base Class Constructor on Inheritance Pin
N a v a n e e t h2-Aug-07 21:24
N a v a n e e t h2-Aug-07 21:24 
GeneralRe: Base Class Constructor on Inheritance Pin
Christian Graus2-Aug-07 21:29
protectorChristian Graus2-Aug-07 21:29 
GeneralRe: Base Class Constructor on Inheritance Pin
N a v a n e e t h2-Aug-07 21:33
N a v a n e e t h2-Aug-07 21:33 
GeneralRe: Base Class Constructor on Inheritance Pin
Christian Graus2-Aug-07 21:35
protectorChristian Graus2-Aug-07 21:35 
GeneralRe: Base Class Constructor on Inheritance Pin
originSH2-Aug-07 21:50
originSH2-Aug-07 21:50 
GeneralRe: Base Class Constructor on Inheritance Pin
Martin#2-Aug-07 21:30
Martin#2-Aug-07 21:30 
GeneralRe: Base Class Constructor on Inheritance Pin
N a v a n e e t h2-Aug-07 21:33
N a v a n e e t h2-Aug-07 21:33 
GeneralRe: Base Class Constructor on Inheritance Pin
Martin#2-Aug-07 21:35
Martin#2-Aug-07 21:35 
QuestionValidation Expression Pin
kinnuP2-Aug-07 20:03
kinnuP2-Aug-07 20:03 
AnswerRe: Validation Expression Pin
Christian Graus2-Aug-07 20:07
protectorChristian Graus2-Aug-07 20:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.