Monday, November 29, 2021

wati.io chatbot for whatsapp documentation

 https://docs.wati.io/reference/post_-serverurl-api-v1-updatecontactattributes-whatsappnumber

Saturday, November 27, 2021

An introduction to Jquery.

 Jquery is a javascript library. Simple syntax of Jquery.


----------------------------**************----------------------------

<!DOCTYPE html>

<html>

<head>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<script>

$(document).ready(function(){

  $("p").click(function(){

    $(this).hide();

  });

});

</script>

</head>

<body>


<p>If you click on me, I will disappear.</p>

<p>Click me away!</p>

<p>Click me too!</p>


</body>

</html>


An introduction to node.js. - How to download NPM

 When you download install Node JS it will install NPM

  • Node.js is an open source server environment
  • Node.js is free
  • Node.js runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
  • Node.js uses JavaScript on the server
Node.js uses asynchronous programming!

And download node.js from https://nodejs.org/en/download

How to download mongodb database. An intro to mongodb database

MongoDB is not a SQL database, it is a document database.


Download  Mongodb compass (The GUI for MongoDB)

https://www.mongodb.com/try/download/compass

Also you have to download mongodb community.

https://www.mongodb.com/try/download/community


-------------------****************---------------------

Also you can use MongoDB Atlas for cloud database.


---------------------***************-----------------------

In mangodb, you can say, collections are your tables.

And documents are your data(records)

-----------------------

To find the data in filter(in mongodb compass), enter below code

{ Country: "Brazil" }
and click on find.

------------------------------***********************---------------------------

Creating Login logic for asp.net C# and Stored procedure for finding Login and password

 

  1. Create procedure [dbo].[spLogin]  
  2. (  
  3. @Email nvarchar(50),  
  4. @Password nvarchar(50)  
  5. )  
  6. as  
  7. begin  
  8. Select COUNT(*) from UserRegistration where Email=@Email and Password=@Password   
  9. end  
  10. ---------------------------------
  11. Clicking on Login button

  12. protected void btnLogin_Click(object sender, EventArgs e)  
  13.         {  
  14.               
  15.             string CS = ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString;  
  16.             using (SqlConnection con=new SqlConnection(CS))  
  17.             {  
  18.                 SqlCommand cmd = new SqlCommand("spLogin", con);  
  19.                 cmd.CommandType = CommandType.StoredProcedure;  
  20.                 con.Open();  
  21.                 cmd.Parameters.AddWithValue("@Email",txtEmail.Text.Trim());  
  22.                 cmd.Parameters.AddWithValue("@Password", Decrypt(txtPassword.Text.Trim()));  
  23.                 int Username = (Int32)cmd.ExecuteScalar();  
  24.                 if (Username == 1)  
  25.                 {  
  26.                     Session["Username"] = txtEmail.Text;  
  27.                     Response.Redirect("Welcome.aspx");  
  28.                     Session.RemoveAll();  
  29.                       
  30.                 }  
  31.                 else  
  32.                 {  
  33.                     lblMessage.ForeColor = System.Drawing.Color.Red;  
  34.                     lblMessage.Text = "Invalid username and password";  
  35.                 }  
  36.             }  
  37.         } 
  38. reference:- https://www.c-sharpcorner.com/blogs/how-to-login-with-encrypted-password-in-asp-net
  39. https://www.c-sharpcorner.com/blogs/how-to-create-user-registration-form-with-encrypted-password-using-asp-net#ReadAndPostComment