Hi all, i am new to VB.NET/ASP.NET. I need a sample project for an online banking (login and view transactions). does anyone have a sample project, or anything that is close to it???
even if you have only a sample login form, i will really appreciate.
thanks in advance.

do as i said-
1)open a form-drag&drop 2 labels,2textboxes& a button
2)on a button name it has (SUBMIT-button)
3)
create a table in sql-server with ur desired tablename
4)the table should have two fields-name,password.
5)entire the data into fields in database.
6)click on the submit button-of the form(in code-behind file)
just paste this code................................


Private Sub sub_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sub_btn.Click
Dim cnn1 As String = ConfigurationSettings.AppSettings("preeconn")
Dim cmd As New SqlCommand("select * from tablename where password = & _ password.text & " ' )", New SqlConnection(cnn1))
cmd.Connection.Open()
cmd.ExecuteNonQuery()
cmd.Connection.Close()
loaddata()
End Sub


Private Sub LoadData()
Dim strSQL As String = "SELECT * FROM tablename "
Dim cnn As String = ConfigurationSettings.AppSettings("preeconn")
Dim cmd As New SqlCommand(strSQL, New SqlConnection(cnn))
cmd.Connection.Open()
Dim myCommand As New SqlDataAdapter(strSQL, cnn)
Dim ds As New DataSet
myCommand.Fill(ds, "table1")
cmd.Connection.Close()
cmd.Connection.Dispose()
End Sub
----------------------------------
in pageload. place this loadata() function
And u get the desired..reply m when ur done or when u have any queries...

i'm doing some similiar project.. but how do i give different permission to different user? i mean like user A can view transaction out while user B can view transaction in.

Hey binoj_daniel, i'm stuck with the step 4. i have tried the example which is your article but I can't understand the 'Step4'. where should I put the code?
thx in advance :)

Thats the codebehind page for the login.aspx page, every aspx page has a codebehind page.

Which ver. of VS are you using, 2003 or 2005?

i'm so sorry for the delay, actually i am also practicing java programming meanwhile.

I am using VS2003

Hi,

You assume there are two text box controls to accept user name and password and button control on login form.

void Button_Click(object sender, System.EventArgs e)
{


if (Page.IsValid)
{
switch (VerifyPassword( txtUsername.Text, txtPassword.Text )) {
case 0:
FormsAuthentication.RedirectFromLoginPage( txtUsername.Text, chkPersist.Checked );
break;
case 1:
lblError.Text = "You did not enter a valid username";
break;
case 2:
lblError.Text = "You did not enter a valid password";
break;
}


}
}


int VerifyPassword( string strUsername, string strPassword ) {
string strConString;
SqlConnection conJobs;
SqlCommand cmdVerify;
SqlParameter parmReturn;


strConString = "Data Source=202.XX.XXX.XX;database=jobsabc;User ID=jobs123;Password=cd546dc;";
conJobs = new SqlConnection( strConString );
cmdVerify = new SqlCommand( "VerifyPassword", conJobs );
cmdVerify.CommandType = CommandType.StoredProcedure;
parmReturn = cmdVerify.Parameters.Add( "@return", SqlDbType.Int );
parmReturn.Direction = ParameterDirection.ReturnValue;
cmdVerify.Parameters.Add( "@username", strUsername );
cmdVerify.Parameters.Add( "@password", strPassword );
conJobs.Open();
cmdVerify.ExecuteNonQuery();
conJobs.Close();
return (int)cmdVerify.Parameters["@return"].Value;
}

Changes for web.config file for the root directory.

<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true"/>
<authentication mode= "Forms">
<forms name=".JobskenCookie" loginUrl="/sitejob/sitepass/loginform.aspx" />
</authentication>
</system.web>
</configuration>

In the above code, sitepass is the password protected subfolder.

Changes for web.config file for the password protected folder. You keep all the password protected .aspx files (which are related to transactions) in this folder.

<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true"/>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>

Hope this helps.

How to program transactions in ASP.net

Edited 3 Years Ago by happygeek: fixed formatting

hi,i really need a vb program in banking but i dnt knw hw..i jst need a simple one.that i can veiw the widrawal and deposit

Edited 6 Years Ago by vanjan3.0: n/a

This article has been dead for over six months. Start a new discussion instead.