Step 1: Create a div element like below:- <div id="twitter_feed" runat="server"></div> Step 2: Add the following method:- using System.Text.RegularExpressions; using System.Runtime.Serialization.Json; using System.Web.Script.Serialization; using System.Net; using System.Security.Cryptography; using System.Globalization; // use this in your page_load method or anywhere… //twitter_feed.InnerHtml = GetTwitterFeeds(); // unique request public static string GetTwitterFeeds() { var oauth_token = "xxxxxxTOKEN-FROM-TWITTER-xxxxxxx"; var oauth_token_secret ..

Read more

Step 1:  Add the below namespave on the top of the code behind of web page using System.Net; Step 2 : You can call the below method to View Pdf on browser using asp.net:- public void viewebook(string pdf_filepath) { string FilePath = Server.MapPath(pdf_filepath); WebClient User = new WebClient(); Byte[] FileBuffer = User.DownloadData(FilePath); if (FileBuffer != ..

Read more

Step 1: Add the below namesapce at the top of the code behind. using System.Net; using System.Text.RegularExpressions; using System.IO; Step 2: Add the following method which will upload the file. public string UploadFile() { try { string filePath = Server.MapPath(@"FolderNamefile.jpg"); string FtpUrl = "ftp://ftp.domain.com/"; string userName = "ftp_user"; string password = "ftp_password"; string UploadDirectory = ..

Read more

In cryptography, SHA-1 (Secure Hash Algorithm 1) is a cryptographic hash function designed by the United States National Security Agency and is a U.S. Federal Information Processing Standard published by the United States NIST.[2] SHA-1 produces a 160-bit (20-byte) hash value known as a message digest. A SHA-1 hash value is typically rendered as a ..

Read more

Disable Right click on Browser using JQuery <html> <head> <title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $(document).bind("contextmenu", function (e) { alert('Right click is disabled'); e.preventDefault(); //or return false; // }); }); </script> </head> <body> </body> &lt..

Read more

jQuery UI Tabs Widget Example or Creating Content Tabs with jQuery UI <html> <head> <title></title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.8/themes/base/jquery-ui.css" type="text/css" media="all" /> <script type="text/javascript"> $(function() { $("#tabs").tabs(); }); </script> </head> <body> <div id="tabs"> <ul> <li><a href="#tabs-1">Tab 1</a></li> <li><a href="#tabs-2">Tab 2</a></li> <li><a href="#tabs-3">Tab 3</a></li> </ul> <div id="tabs-1"> <p> www.sourcecodehub.com </p> </div> ..

Read more

 EMail Validation using jQuery with Regular Expression | How to do EMail validation using jQuery <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <title></title> <script type="text/javascript"> $(document).ready(function () { $('#btnSubmit').click(function () { var inputEmail = $("#txtEmail").val(); var emailRegularExpression = /^(^([0-9a-zA-Z]+([_.-]?[0-9a-zA-Z]+)*)@[0-9a-zA-Z]+([_.-]?[0-9a-zA-Z])*.[a-zA-Z]{2,4})+$/; if (!emailRegularExpression.test(inputEmail)) { $('#ErrorMessage').html('Invalid Email Address'); } }); }); </script> </head> <body> <input type="text" id="txtEmail" /> ..

Read more

 Get and set name of the button using jQuery <html> <head> <title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function () { //seeting value of the button name $('#btnName').val("Submit button"); //getting value of the button name. alert($('#btnName').val()); }); </script> </head> <body> <input type="button" id="btnName" /> </body> </html&..

Read more