i have one problem actually i make a project in .net n i have one problem in my project a data entry from is present so many enteries like sender and receiver detail is present them my form is not look well so i want user fill this entry in step but data save in same table then plz tell me solution of my problem
i have a one problem in my project display table data in form using gridview but in table countryid are stored i want to display a country name in grid view and that country name stored in xml file then how to fetch the country name in xml file plz give me solution through video
hai emmu..i am ram from chennai..im doins a 'project online movie ticket booking'..i need a code and method for seat selection..im doing it asp.net with c# code..can u plz help me..
Thanks a lot..I have learnt a lot from ur tutorials..very useful..I have a request..Please put a tutorial on login using salted has algorithm and user roles..May God Bless you..
I have followed your tutorial but I can not login with the correction login details. Wrong password error shows all the time. Can you help?
My code is below, I can't see any difference between your code and mine!
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient;
public partial class login : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {
}
SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=C:\\Users\\Documents\\Visual Studio 2010\\WebSites\\forum\\App_Data\\forum.mdf;Integrated Security=True;User Instance=True"); SqlCommand cmd; SqlDataReader dataReader;
protected void Button1_Click(object sender, EventArgs e) { con.Open(); cmd = new SqlCommand("SELECT Password FROM members WHERE Username='" + txtUsername.Text + "'", con); dataReader = cmd.ExecuteReader(); if (!dataReader.Read()) { Response.Write("Wrong Details"); } else { if (dataReader[0].ToString() == txtPassword.Text) Response.Redirect("index.aspx"); else Response.Write("Wrong Password"); }
Hi Emmu, can u plsz help me to find wats wrong with the code...... SqlConnection con = new SqlConnection(@"Data Source=HARISHPRAVEEN\SQLEXPRESS;Initial Catalog=flavourzsfoods;Integrated Security=True"); SqlCommand cmd; SqlDataReader dr =null;
protected void Button1_Click(object sender, EventArgs e) { con.Open(); cmd = new SqlCommand("SELECT * FROM login WHERE username= '" + TextBox1 + "'", con); dr = cmd.ExecuteReader(); if (!dr.Read()) { Label1.Text = "Wrong detials";
i am following you from last two months. i have learned a lot but i have a small problem i am not getting the sql server 2008 browser. i have configuration tools as configuration manager,installation tools but i am not getting web browser can you please let me how to get the browser
SqlConnection con = new SqlConnection("Data Source=AFVAN;Initial Catalog=login;Integrated Security=True"); SqlCommand cmd; SqlDataReader dr; protected void LinkButton1_Click(object sender, EventArgs e) { string un = ""; un=TextBox1.Text; con.Open(); Response.Write("connected"); cmd = new SqlCommand("select * from login where username='un'",con); dr=cmd.ExecuteReader();//error here that the connection property is not initialised if (dr.Read()) { Label1.Text = "USERNAME AVAILABLE";
i also write shared dr As SqlDataReader
ReplyDeletebut error again
try after
ReplyDeleteremoving brackets
dr = cmd.ExecuteReader
again error..
ReplyDeleteSure i will make a video on LOGIN in ASP(vb)
ReplyDeletegreat work man..i just would like to know how do we authorize roles for users after login
ReplyDeletei made connection between both my asp page and sql server..but when i execute it shows an error on the term "con.open"..plz give me the solution.
ReplyDeletei have one problem actually i make a project in .net n i have one problem in my project a data entry from is present so many enteries like sender and receiver detail is present them my form is not look well so i want user fill this entry in step but data save in same table then plz tell me solution of my problem
ReplyDeleteyou can use sessions to store values on one page and insert all values at one page.... if i got time i vll show you through a video
ReplyDeleteThanks
i have a one problem in my project display table data in form using gridview but in
ReplyDeletetable countryid are stored i want to display a country name in grid
view and that country name stored in xml file then how to fetch the
country name in xml file plz give me solution through video
hai emmu..i am ram from chennai..im doins a 'project online movie ticket booking'..i need a code and method for seat selection..im doing it asp.net with c# code..can u plz help me..
ReplyDeleteThanks a lot..I have learnt a lot from ur tutorials..very useful..I have a request..Please put a tutorial on login using salted has algorithm and user roles..May God Bless you..
ReplyDeleteI have followed your tutorial but I can not login with the correction login details. Wrong password error shows all the time. Can you help?
ReplyDeleteMy code is below, I can't see any difference between your code and mine!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
public partial class login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=C:\\Users\\Documents\\Visual Studio 2010\\WebSites\\forum\\App_Data\\forum.mdf;Integrated Security=True;User Instance=True");
SqlCommand cmd;
SqlDataReader dataReader;
protected void Button1_Click(object sender, EventArgs e)
{
con.Open();
cmd = new SqlCommand("SELECT Password FROM members WHERE Username='" + txtUsername.Text + "'", con);
dataReader = cmd.ExecuteReader();
if (!dataReader.Read())
{
Response.Write("Wrong Details");
}
else
{
if (dataReader[0].ToString() == txtPassword.Text)
Response.Redirect("index.aspx");
else
Response.Write("Wrong Password");
}
}
}
Is should work Paul check your Database Values?
ReplyDeleteHi Emmu,
ReplyDeletecan u plsz help me to find wats wrong with the code......
SqlConnection con = new SqlConnection(@"Data Source=HARISHPRAVEEN\SQLEXPRESS;Initial Catalog=flavourzsfoods;Integrated Security=True");
SqlCommand cmd;
SqlDataReader dr =null;
protected void Button1_Click(object sender, EventArgs e)
{
con.Open();
cmd = new SqlCommand("SELECT * FROM login WHERE username= '" + TextBox1 + "'", con);
dr = cmd.ExecuteReader();
if (!dr.Read())
{
Label1.Text = "Wrong detials";
}
else
{
if (dr[0].ToString() == TextBox2.Text)
Response.Redirect("makeorder.aspx");
else
Label1.Text = "Wrong detials";
}
}
hi emmu,
ReplyDeletei posted the above comment....
Even i enter the correct details it shows as "wrong detail ".......
plsz help me
hi emmu,
ReplyDeletei am following you from last two months. i have learned a lot but i have a small problem i am not getting the sql server 2008 browser. i have configuration tools as configuration manager,installation tools but i am not getting web browser can you please let me how to get the browser
SqlConnection con = new SqlConnection("Data Source=AFVAN;Initial Catalog=login;Integrated Security=True");
ReplyDeleteSqlCommand cmd;
SqlDataReader dr;
protected void LinkButton1_Click(object sender, EventArgs e)
{
string un = "";
un=TextBox1.Text;
con.Open();
Response.Write("connected");
cmd = new SqlCommand("select * from login where username='un'",con);
dr=cmd.ExecuteReader();//error here that the connection property is not initialised
if (dr.Read())
{
Label1.Text = "USERNAME AVAILABLE";
}
else
{
Label1.Text = "NOT AVAILABLE";
}