Hi! I want to change the color of a particular charecter in a textbox how it is possible...
vijayashanthi
Posts
-
How to Change a color in TextBox? -
datagrid very urgenthi! how to change the font in one row in a datagrid..
-
help regarding crystal reporthi! i want to create a crystal report using stored procedure... i am using vs 2003.. i want to pass a parameter.. i want one example for passing parameter to crystal report
-
help regarding crystal reportok.. thanks..
-
help regarding crystal reporti am using vs 2003..
-
help regarding crystal reporthi i want to pass a parameter in crystal report.. i want one complete example..
-
crystal reporthi i am using windows application... i want to create crystal report using stored procedure pls help me..
-
dsnhi i want to create a dsn in sql server authentication pls help me..
-
crystal reporthi i want to know how to run a crystal report in c#.
-
numeric textboxhow to create a numeric textbox! i want coding...
-
textbox validation very urgenthi! i want to create the following textboxes.. please help me.. 1.one textbox contains numeric values only. 2.one contains characters only. 3.one contains EmailId. 4.one contains phone no 5.one contains pincode. 6.one contains fax no. 7. one contains mobile no. 8. one contains fax no. how to validate this?
-
problem in login pagehi all i am creating a login page and my problem was, sp returns value for Num_of_User = 1 but the returnParam will always got a returnParamValue = 0.. what is wrong with this code... this my code... CREATE TABLE NorthWindUsers (UserID INT IDENTITY(1,1) NOT NULL, UserName VARCHAR(50) NOT NULL, Password VARCHAR(50) NOT NULL) INSERT INTO NorthWindUsers (UserName, Password) VALUES ('sachin', 'tendulkar') alter PROCEDURE sp_ValidateUser ( @UserName VARCHAR(50) = Null, @Password VARCHAR(50) = Null, @Num_of_User INT = 0 ) AS SET @Num_of_User = (SELECT COUNT(*) AS Num_of_User FROM NorthWindUsers WHERE UserName = @UserName AND Password = @Password) Return @Num_of_User private void btnSubmit_Click(object sender, System.EventArgs e) { int maxLoginAttempts = (int)Session["MaxLoginAttempts"]; if (Session["LoginCount"].Equals(maxLoginAttempts)) { Response.Redirect("WebForm1.aspx?reason=maxloginattempts"); } if(Page.IsValid) { if(DBConnection(txtusername.Text.Trim(),txtPassword.Text.Trim())) { FormsAuthentication.RedirectFromLoginPage(txtusername.Text, false); } else { lblMessage.Text = "Invalid Login Please Try again...."; } } } private bool DBConnection(string txtUser,string txtPass) { //int a; SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["connstr"]); SqlCommand myCommand = new SqlCommand("sp_ValidateUser", myConnection); myCommand.CommandType = CommandType.StoredProcedure; SqlParameter objParam1; SqlParameter objParam2; SqlParameter returnParam; objParam1 = myCommand.Parameters.Add("@UserName", SqlDbType.VarChar); objParam2 = myCommand.Parameters.Add("@Password",SqlDbType.VarChar); returnParam = myCommand.Parameters.Add ("@Num_of_User",SqlDbType.Int); objParam1.Direction = ParameterDirection.Input; objParam2.Direction = ParameterDirection.Input; returnParam.Direction = ParameterDirection.ReturnValue; objParam1.Value = "txtuser"; objParam2.Value = "txtPass"; //a = Convert.ToInt32(myCommand.Parameters["@num_of_User"].Value); try { if(myConnection.State.Equals(ConnectionState.Closed)) { myConnection.Open(); returnParam = myCommand.ExecuteNonQuery(); //Int32 rowCount = (Int32)catDA.InsertCommand.Parameters["@RowCount"].Value; } if((int)returnParam.Value