C# Corner FAQ Integration in Web Application Using IntroJS

Introduction

This article covers how to use Intro JS in our web application.

Please see this article in my blog: http://sibeeshpassion.com/using-introjs.html
Background

We all are familiar with C# Corner FAQ. So I thought of integrating the FAQ with Intro JS. I hope you will like it :).

Using the code

To start we need to download the intro js plug in and the necessary files. Please download those fromhere.
Now after downloading, extract the files. You can see many files there. From that select the necessary files alone for now.

  1. bootstrap-responsive.min.css
  2. bootstrap.min.css
  3. demo.css
  4. introjs.css
  5. intro.js

Now include all the preceding files to our website and create a web page as well. So the next step is to include the files in our web page (in this case Default.aspx).

  1. <!– styles –>
  2.     <link href=“bootstrap.min.css” rel=“stylesheet” />
  3.     <link href=“demo.css” rel=“stylesheet” />
  4.     <link href=“bootstrap-responsive.min.css” rel=“stylesheet” />
  5.     <!– Add IntroJs styles –>
  6.     <link href=“introjs.css” rel=“stylesheet” />

So now to identify what exactly are the basics of this plug. For example I have given a UI element as:

  1. <p class=“lead” data-step=“2” data-intro=“Another step.”>

In this you can see data-step=”2″, what does it mean? It means this element must be fired second 🙂 You can see more UI elements with this data-step attribute in DefaultCCorner.aspx.

And to make our page more responsive I have added the following images from the C# corner page.

  • 1.png
  • 2.png
  • 3.png
  • 4.png
  • 5.png
  • 6.png
  • 7.png

After all these steps, this is how our page looks.

  1. <%@ Page Language=“C#” AutoEventWireup=“true” CodeFile=“Default.aspx.cs” Inherits=“_Default” %>
  2. <!DOCTYPE html>
  3. <html lang=“en”>
  4.   <head>
  5.     <meta charset=“utf-8”>
  6.     <title>How you can write code project article</title>
  7.     <meta name=“viewport” content=“width=device-width, initial-scale=1.0”>
  8.     <!– styles –>
  9.     <link href=“bootstrap.min.css” rel=“stylesheet” />
  10.     <link href=“demo.css” rel=“stylesheet” />
  11.     <link href=“bootstrap-responsive.min.css” rel=“stylesheet” />
  12.     <!– Add IntroJs styles –>
  13.     <link href=“introjs.css” rel=“stylesheet” />
  14.   </head>
  15.   <body>
  16.     <div class=“container-narrow”>
  17.         <div class=“masthead”>
  18.             <ul class=“nav nav-pills pull-right” data-step=“9” data-intro=“Get it, use it.”>
  19.                 <img src=“9.png” />
  20.             </ul>
  21.         </div>
  22.         <hr>
  23.         <div class=“jumbotron”>
  24.             <h1 data-step=“1” data-intro=“This is a tooltip!”>What is C# corner? </h1>
  25.             <p class=“lead” data-step=“2” data-intro=“Another step.”>
  26.                 Started in 2000 as a hobby, C# Corner is an absolutely FREE online social community for IT Developers and Professionals to exchange their knowledge and experience by teaching and learning from one another by using various interactive online methods such as contributing articles, discussion forums, blogs, and videos. Today, C# Corner and Mindcracker network reach over 3+ million monthly users.
  27.             </p>
  28.             <a class=“btn btn-large btn-success” href=“javascript:void(0);” onclick=“javascript:introJs().start();”>Show me how I can write an article!.</a>
  29.         </div>
  30.         <hr>
  31.          <div class=“span6” data-step=“5” data-intro=“More And More.” data-position=‘left’>
  32.                 <h4>Step 3: Article contents</h4>
  33.                 <p>
  34.                     <img src=“3.png” />
  35.                 </p>
  36.             </div>
  37.         <div class=“row-fluid marketing”>
  38.             <div class=“span6” data-step=“3” data-intro=“Ok, wasn’t that fun?” data-position=’right’>
  39.                 <h4>Step 1: Submit an article</h4>
  40.                 <p>
  41.                     <img src=“1.png” />
  42.                 </p>
  43.             </div>
  44.              <div class=“span6” data-step=“7” data-intro=“Still More.” data-position=‘left’>
  45.                 <h4>Step 5: Done</h4>
  46.                 <p>
  47.                     <img src=“5.png” />
  48.                 </p>
  49.             </div>
  50.             <div class=“span6” data-step=“4” data-intro=“More features, more fun.” data-position=‘left’>
  51.                 <h4>Step 2: Agree</h4>
  52.                 <p>
  53.                     <img src=“2.png” />
  54.                 </p>
  55.             </div>
  56.              <div class=“span6” data-step=“6” data-intro=“Still More.” data-position=‘left’>
  57.                 <h4>Step 6: Author’s Article </h4>
  58.                 <p>
  59.                     <img src=“6.png” />
  60.                 </p>            </div>
  61.             <div class=“span6” data-step=“8” data-intro=“Still More.” data-position=‘left’>
  62.                 <h4>Step 7: Author’s Article: Under review</h4>
  63.                 <p>
  64.                     <img src=“7.png” />
  65.                 </p>
  66.             </div>
  67. <div class=“span6” data-step=“9” data-intro=“Still More.” data-position=‘left’>
  68.                 <h4>Step 8: Sign Up</h4>
  69.                 <p>
  70.                     <img src=“8.png” />
  71.                 </p>
  72.             </div>
  73.         </div>
  74.         <hr>
  75.     </div>
  76.     <script type=“text/javascript” src=“intro.js”></script>
  77. </body>
  78. </html>

Thank you for reading 🙂

Output: What is C# Corner?

See more here: http://usablica.github.io/intro.js/

History

First Version: 12-11-2014

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

Serverless 360