Posts

Showing posts from November, 2011

How to implement cookies to save your ID and Password (ASP.NET)

Image
"Cookies can be defined as a small text files that are created by Web Server and saved by Web Browser on Client's Machine" However, if clients machine has disabled 'Cookies' , the script to create & store cookies will lose its effect. Here, we are going to create a LOGIN page, that ask user to enter it's ID and PASSWORD. Also, if user selects, 'Keep me Signed in' for next visit, we'll save its ID & Password Following are the name of controls on our LOGIN Page: 1. idlbl for Your Id Label 2. idtxt for textbox where User ID will be entered. Also set its AUTOPOSTBACK property to TRUE 3. passlbl for Password Label 4. Passtxt for textbox where password will be entered. 5. loginbtn for LOGIN button Write following declaration statement in General Section Dim uid as HttpCookie Write following code at LOGIN Button if checkbox1.chcked=true then     uid = New HttpCookie(idtxt.text)     uid.value=passtxt.text      Response.Cooki...

Manual Method for DataBase Connectivity to INSERT Record into DATABASE TABLE

Following steps needs to be followed if you want to have a manual database connectivity 1. Dim cn as New Data.SqlClient.SqlConnection 2. Dim cm as New Data.SqlClient.SqlCommand 3. Dim str as String 4. cn.ConnectionString="Data Source = servername\sqlexpress;Initial Catalog=databasename;Integrated Security=True" 5. cm.Connection =cn 6. cm.CommandType=Data.CommandType.Text 7. str="your Insert SQL statement goes here" 8. cm.commandText=str 9. cn.open() 10. cm.ExecuteNonQuery 11. cn.Close() I have given above statements taken into considerations your VB/ASP .net interface. You are required to change the statements accordingly, depending on the language you're working on