User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 456,499 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,735 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 5701 | Replies: 10
Reply
Join Date: Aug 2007
Location: Mauritius
Posts: 10
Reputation: Steven_C is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Steven_C Steven_C is offline Offline
Newbie Poster

need a sample project in VB.NET/ASP.NET

  #1  
Sep 19th, 2007
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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2007
Posts: 82
Reputation: preetham.saroja is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
preetham.saroja's Avatar
preetham.saroja preetham.saroja is offline Offline
Junior Poster in Training

Re: need a sample project in VB.NET/ASP.NET

  #2  
Sep 19th, 2007
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................................


PrivateSub 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...
Reply With Quote  
Join Date: Sep 2007
Posts: 4
Reputation: hoon is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
hoon hoon is offline Offline
Newbie Poster

Re: need a sample project in VB.NET/ASP.NET

  #3  
Sep 20th, 2007
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.
Reply With Quote  
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Solution Re: need a sample project in VB.NET/ASP.NET

  #4  
Sep 21st, 2007
Here is the best sample I have for you. It implements a sample login system using Ascess DB. You can also read the full article and download the source here

Let me know if you need further help.
Reply With Quote  
Join Date: Aug 2007
Location: Mauritius
Posts: 10
Reputation: Steven_C is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Steven_C Steven_C is offline Offline
Newbie Poster

Re: need a sample project in VB.NET/ASP.NET

  #5  
Sep 23rd, 2007
ok thanx very much for the help friends!!
Reply With Quote  
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Re: need a sample project in VB.NET/ASP.NET

  #6  
Sep 23rd, 2007
So was my article of any help?
Reply With Quote  
Join Date: Aug 2007
Location: Mauritius
Posts: 10
Reputation: Steven_C is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Steven_C Steven_C is offline Offline
Newbie Poster

Re: need a sample project in VB.NET/ASP.NET

  #7  
Sep 25th, 2007
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
Reply With Quote  
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Question Re: need a sample project in VB.NET/ASP.NET

  #8  
Sep 25th, 2007
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?
Reply With Quote  
Join Date: Aug 2007
Location: Mauritius
Posts: 10
Reputation: Steven_C is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Steven_C Steven_C is offline Offline
Newbie Poster

Re: need a sample project in VB.NET/ASP.NET

  #9  
Oct 3rd, 2007
i'm so sorry for the delay, actually i am also practicing java programming meanwhile.

I am using VS2003
Reply With Quote  
Join Date: Aug 2007
Posts: 11
Reputation: vbsqluser is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
vbsqluser vbsqluser is offline Offline
Newbie Poster

Re: need a sample project in VB.NET/ASP.NET

  #10  
Oct 4th, 2007
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
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb VB.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the VB.NET Forum

All times are GMT -4. The time now is 3:28 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC