Monday 16 May 2016

HTML5 Interview Questions

1. What is difference between <b> and <strong>?
GUI point of view both are same, but strong give text is "important"
Browsers display <strong> as <b>, and <em> as <i>.


2. What is difference between <i> and <em>?
GUI point of view both are same, but strong give text is "important"
Browsers display <strong> as <b>, and <em> as <i>.


3. What is <q> tag?
q tag this text under quote.

4. What is difference between background-color and color style keywords?
background-color to change background color of text and color to the color of text.


Your comment will help us to improve blog.


Friday 13 May 2016

Asp.Net MVC Lab Exercise and Lab Practice

ASP.NET MVC Lab Exercises

Dear Visitor,

I am providing ASP.NET MVC Lab Exercises and link for exercises.

This post dedicated for those beginner who seek lab practice questions to check their knowledge in ASP.NET MVC.

Write your answer in step by step and take screen shot of those steps.

Lab Practice Question for Asp.Net MVC for very beginner.

  • Create a new Controller named “Friend”.
  • Create a Model named “Friend” with following properties : FriendID,FriendName,Place
  • Create a Index (List of Friends) View and Method in Friend controller.

  • .
  • Update your model Friend for validation.
  • Make it FriendID as Required attribute.
  • Make it FriendName as Error Message = Friend Name Empty Not Allowed.
  • Make it Place entry resticted to Maximum Character = 25
  • Create a Insert new friend --> View and Method in Friend controller.
  • Insert new record with using Model in post.



  • Before Inserting check your Model means validate your model.
  • Create edit/Update View and Method in Controller. 
  • Update record with using FormCollection technique.


  • Create Delete view and Method for delete a friend in post method of Controller.
  • Perform above all data CRUD (Create Retrieve Update Delete) activities in following ways:
               ADO.NET code
               Linq To Sql
               Entity Framework




ASP.NET MVC Other Exercises


 Following are the other links for ASP.NET MVC Exercises:








Happy Coding...
Thank You
Manoj Kalla

Thursday 12 May 2016

Hash Table

HashTable

In this article I will explain about HashTable of C#.

Its collection type of object, which store on the basis of KEY , VALUE.
Key is use to access the element and its value.

HashTable required pair of Key,Value.

If you know the ASP.NET, recollect or check VIEWSTATE declaration and recall mechanism.

HashTable declration and recall is similar to VIEWSTATE, SESSION.



System.Collections namespace required to use HASHTABLE.

using System.Collections;




HashTable: Represents a collection of Key/Value pairs that are organized based on the has code of the key.

You can assign the value to HASHTABLE with two different ways.

  1. Method 1 to Assign Key/Value to HashTable
Hashtable _htable = new Hashtable();
_htable["WindowsPath"] = "C:\\Windows";

  1. Method 2 To Assign Key/Value to HashTable
      Hashtable _htable = new Hashtable();
_htable.Add("WindowsPath", "C:\\Windows");





Step 1
Create Console Application
Named: HashTableConsoleApp


HashTable having following method:
  1. Add : Add new item with Key and Value pair.
  1. Clear : Remove all items from HashTable.
  2. Clone :
  3. ContainsKey : Check given value exists in KEY side or not.

  1. ContainsValue : Check given value exists in VALUE side or not.


  1. CopyTo : Copy hashtable into array.



  1. Keys : Hashtable store value against title / heading of Keys.


  1. Remove :
  2. Values : Store the values of Keys.

  1. Count : Total numbers of keys/values pair in hashtable.


Code
using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HashTableConsoleApp
{
class Program
{
static void Main(string[] args)
{
Hashtable _htable = new Hashtable();
//Style 1 to add key/value
_htable["1"] = "Ashish";
//Style 2 to add key/value
_htable.Add("2", "Suhana");
_htable.Add("3", "Aakash");
_htable.Add("4", "Simran");
_htable.Add("5", "Rajesh");
_htable.Add("6", "Mahesh");
_htable.Add("7", "Suresh");
_htable.Add("8", "Pritesh");
_htable.Add("9", "Jayesh");
_htable.Add("10", "Mayuresh");
_htable.Add("11", "Ramesh");
_htable.Add("12", "Rajniesh");
//To Get total numbers of item in hashtable.
int TotalItems = _htable.Count;

Console.WriteLine("=================================");
Console.WriteLine("Displaying Total Numbers of Keys");
Console.WriteLine("=================================");

// Display the keys.
foreach (string key in _htable.Keys)
{
Console.WriteLine(key);
}
Console.WriteLine();
Console.WriteLine();
Console.WriteLine("==================================");
Console.WriteLine("Displaying Total Numbers of Values");
Console.WriteLine("==================================");

// Display the values.
foreach (string value in _htable.Values)
{
Console.WriteLine(value);
}

Console.WriteLine("Total Item in HashTable :" + Convert.ToString(TotalItems));

Console.WriteLine();
Console.WriteLine();
///Removing 6 Number of Keys
Console.WriteLine("==================================");
Console.WriteLine("Removing 6th Item of HashTable");
Console.WriteLine("==================================");
_htable.Remove("6");

Console.WriteLine("=================================");
Console.WriteLine("Check 6th Number Keys Removed");
Console.WriteLine("=================================");
// Display the keys.
foreach (string key in _htable.Keys)
{
Console.WriteLine(key);
}
Console.WriteLine();
Console.WriteLine();
Console.Read();

//To clear the hashtable.
_htable.Clear();


}
}
}


Happy Coding...


HTML 5 Tag Part 1

HTML 5

In this article you learn new tag and features of HTML5 in this article.

HTML5 is markup language advanced version and features of HTML.


From :
HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and current version of the HTML standard.

It was published in October 2014 by the World Wide Web Consortium (W3C) to improve the language with support for the latest multimedia, while keeping it easily readable by humans—and consistently understood by computers and devices such as web browsers, parsers, etc. HTML5 is intended to subsume not only HTML 4, but also XHTML 1 and DOM Level 2 HTML.



Follwing is Tag list which incorporated in HTML5:


1. article
2. aside
3. audio
4. canvas
5. command
6. datalist
7. embed
8. figcaption
9. figure
10. footer
11. header
12. hgroup
13. keygen
14. meter
15. nav
16. output
17. progress
18. rp
19. rt
20. ruby
21. section
22. source
23. summary
24. time
25. track
26. video
27. wbr:



  1. article: This tag specially designed for browser will sense the article summary and detail. In shrot <article> tag disclose independent title and details of contents. Article tag can be used in pages like Normal Contents , Blog Post.

Example1:
<article>
<header>
<h3>Posted by: Manoj Kalla</h3>
<p>Auction 1 hour ago</time></p>
</header>
<p>I love to sing my favourite songs</p>
</article>
<article>
<header>
<h3>Posted by: Ashish Kalla</h3>
<p>Way to Newyork </time></p>
</header>
<p>Today envening, moving to newyork for new assignment</p>
</article>

other useful link to know article tag:



  1. aside : This tag store the info/content which content not forceliy attached with Main content of page.

<article>
<header>
<h1>Csharpcorner</h1>
</header>
<p>CSharpcorner is platform where pepole come together and share there knowledge and serve society through there technical knowledge of different different programming languages.</p>
<aside>
<dl>
<dt>C#</dt>
<dd>Dot Net Programming Language</dd>
<dt>ASP.NET</dt>
<dd>A server-side scripting language for the web application.</dd>
</dl>
</aside>
</article>


  1. audio : Play audio file on page. Basically MP3 format supported by all browser.

Example:
<audio>
<source src="elvis.mp3" type='audio/mpeg; codecs="mp3"'>
</audio>






  1. canvas : This tag used for create a graphic with help of javascript.
Runtime this will create graphic as per your specification given in javascript.

Example:
<!DOCTYPE html>
<html>
<body>

<canvas id="rect" width="400" height="200" style="border:2px solid #f21000;">
</canvas>

<script>
var c = document.getElementById("rect");
var ctx = c.getContext("2d");
ctx.fillStyle = "#F25000";
ctx.fillRect(10,10,380,180);
</script>

</body>
</html>




  1. command : Command that a user can invoke


  1. datalist : To create a combobox where we can select as well as type new value. (Rembering Visual Foxpro days). Predefined value for user and user can type new one also.

<label>Enter Mumbai Suburb name:</label>
<input type="text" list="mumbaisuburbs" />

<datalist id="mumbaisuburbs">
<option value="Churchgate">
<option value="Marine Lines">
<option value="Borivali">
<option value="Kandivali">
<option value="Malad">
<option value="Goregoan">
<option value="Jogeshwari">
<option value="Mumbai Central">
<option value="Mira Road">
<option value="Bhayandar">
</datalist>


  1. embed : Plugin external file likewise Flash file

Example:
<embed src=”companyintro.swf" > </embed>



Rest of Tag we will learn in next article....

Happy Coding,

Thank You,

Manoj Kalla