Skip to main content

Posts

Showing posts from December, 2016

How to attach datepicker with your input text?

Today, we will learn about attaching Datepicker with your input text. It is a very easy task . It will just take  around  30 seconds.. Let's Start ! Step 1 : Create html Page having input textbox. <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- FOR DATEPICKER --> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <!-- FOR BOOTSTRAP --> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <script src="demoda...

SQL SERVER : generate Random number with prefix character

Sometimes there is a situation in which we need to generate a unique random number with some prefix. For example, in Railway,  reservation a number like RAIL4562 . There are various approaches to achieve this . But, we can do this using following query. select 'LearnAll'+cast((SELECT 10 + CONVERT(INT, ((9999-10)+1)*RAND())) as varchar) When you run above-stated query,  the result will look like below: LearnAll1382 LearnAll8342 Credit for this Logic : Vinay For More Updates stay connected On :  Learn2All Facebook Page Amazing Concepts in Video :   Video On YouTube

Create connection string for your SQL SERVER Database in C#

Today, we will discuss about creating a connection string to establish a connection in Asp.Net To create a connection string, add following lines to your web.config file. <connectionStrings> <add name="connectionstr" connectionString="Data Source=.\DHRUVIN\SQLEXPRESS;Initial Catalog=DEMO_SSRS;Integrated Security=true";User id="user";Password="pass@123" /> </connectionStrings> Here Data Source = SQL SERVER Name Initial Catalog = Name of Database which you want to connect User id = username of SQL SERVER Password = password of SQL SERVER Now your connection string is ready to be used.  You can use it in code behind or in web.config file. For More Updates stay connected On :  Learn2All Facebook Page Amazing Concepts in Video :   Video On YouTube

Create complex JSON structure using List and Dictionary

In this blog we will learn  about creating  complex JSON structure using List and Dictionary. Before we start I assume that you have basic idea about Dictionary and List. If not please check out this video. Dictionary in C# Now let's start! First of all I'm going to show you a JSON structure which I want to create. Please observe above Json structure. [{ "UserId": "0", "ResorceName": "Employee 0", "TimeRecords": [{ "Date": "2016-10-25", "Tasks": ["Task 0", "Task 1", "Task 2", "Task 3", "Task 4", "Task 5"] }, { "Date": "2016-10-26", "Tasks": ["Task 0", "Task 1", "Task 2", "Task 3", "Task 4", "Task 5"] }, { "Date": "2016-10-2...