google

Newest Post

Showing posts with label jQuery. Show all posts
Showing posts with label jQuery. Show all posts

Convert DataSet or DataTable into JSON in C#

| Tuesday, June 10, 2014
Read more »
 public string ConvertToJSON(DataSet ds)  
 {  
 System.Web.Script.Serialization.JavaScriptSerializer serializer = 
new System.Web.Script.Serialization.JavaScriptSerializer();  
     List<Dictionary<string, object>> rows = 

new List<Dictionary<string, object>>();  
     Dictionary<string, object> row = null;  
     foreach (DataRow dr in ds.Tables[0].Rows)  
     {  
       row = new Dictionary<string, object>();  
       foreach (DataColumn col in ds.Tables[0].Columns)  
       {  
         row.Add(col.ColumnName.Trim(), dr[col]);  
       }  
       rows.Add(row);  
     }  
     return serializer.Serialize(rows);  
 }  

Convert DataSet or DataTable into JSON in C#

Posted by : Stranger
Date :Tuesday, June 10, 2014
With 0comments

Dynamic Menu using HTML and CSS in ASP.Net

| Tuesday, March 25, 2014
Read more »
In this article we will create nested dynamic menus and submenus using CSS and HTML which all browsers support.
  
Let's start by creating a website as:
  1. Start - All Programs - Microsoft Visual Studio
  2. File - New Website - C# - Empty website (to avoid adding a master page)
  3. Give the web site a name such as NestedSubmenu or whatever you wish and specify the location
  4. Then right-click on Solution Explorer - Add New Item - Default.aspx page
Open the source view and use the list tag to create the Menu and Submenu. The source code 
<body> tag should be as in the following:

 <body bgcolor="#c0c0c0">  
   <form id="form2" runat="server">  
   <ulid="Ul1">  // for horizontal Main Menu Tab  
 <li><ahref="#" title ="Homepage" class="selected">About Us</a ></li >  
 <li ><a href ="#" title ="About us">Authors</ a ></li >  //for submenu  
 <li ><a href ="#" title ="Projects">Articles</a >  
 <ul>  
 <li ><a href ="#" title="Older projects">Older Articles</a > //for submenu  
 <ul>  
 <li> <a href ="#" title ="">ASP.Net </ a ></ li >// for Nested subemenu and <a> tag is used to pass URL address  
 <li> <a href ="#" title ="">Silverlight</a ></ li >  
 <li> <a href ="#" title ="">Ajax</a ></ li >  
 </ ul >  
 </ li >  
  <li> <a  href ="#" title ="Active projects">New Articles</a > //for submenu  
 <ul>  
 <li> <a href ="" title ="Excel FIle">File Upload</a ></ li > // for Nested subemenu  
 <li> <a href ="" title ="ConvertNoToString">Convert Number</a ></li >  
 <li> <a href ="" title ="Stored Procedure">Stored Procedure</a ></ li >  
 </ ul >  
 </ li >  
 </ ul >  
 </ li >  
 <li> <a href ="#" title ="Contact">Contact Us</a ></ li >  
 </ul >  
   </form>  
 </body>  

In the above source code the <li> tag is used to create a horizontal Main Menu and the <ul> list tag is used to create the submenu, again under the <ul> used and another <ul> tag to create a nested submenu.
Applying effects to the Menu using CSS
 
To apply the effects to the menu use the following CSS classes:

 #menu, #menu ul  /*for main menu *\  
  {  
 list-style:none;  
 padding:0;  
 margin:0;  
 }  
 /* SHOW SUBMENU 1 */  
 #menu li:hover ul, #menu li.over ul   
 {  
 display:block;  
 }  
 #menu li:hover ul ul, #menu li.over ul ul   
 {  
 display:none;  
 }  
 /* SHOW SUBMENU 2 */  
 #menu ul li:hover ul, #menu ul li.over ul   
 {  
 display:block;  
 }  
 /* for mouse hover */  
 #menu a:hover   
 {  
 background-color:#5798B4;  
 color:#fff;  
 }  

The output in the browser will be:

nestedmenu.jpg


Dynamic Menu using HTML and CSS in ASP.Net

Posted by : Stranger
Date :Tuesday, March 25, 2014
With 0comments

Calculate Age from Date of Birth Using Java Script.

| Saturday, March 2, 2013
Read more »
Calculate Age from Date of Birth Using Java Script.: In my previous posts, I explained jQuey .toggleClass() Example in ASp.Net , jQuery Draggable Div Example in ASP.Net , Disable cut, copy and...

Calculate Age from Date of Birth Using Java Script.

Posted by : Stranger
Date :Saturday, March 2, 2013
With 0comments

Simple jQuery Image Slideshow Example with Text Overlay in Asp.net

| Monday, February 18, 2013
Read more »
Simple jQuery image slideshow example with text overlay or Simple jQuery image slideshow with caption or jQuery image slideshow with content or jQuery image slideshow with links in asp.net.

 
Simple jQuery Image Slideshow Example with Text Overlay in Asp.net

Simple jQuery Image Slideshow Example with Text Overlay in Asp.net

Posted by : Stranger
Date :Monday, February 18, 2013
With 0comments

Show Message Bar at the top of the page using HTML and jQuery

| Wednesday, February 13, 2013
Read more »
Download Code

This article will focus on displaying notifications or messages at the top of the website page using HTML and jQuery.

Links to required jQuery files will be added in the head section of the page.

  <script src="jquery.js" type="text/javascript"></script> 
 <script src="juery.topbar.js" type="text/javascript"></script>  


The source code includes 4 types of demonstrations of the top message bar.Following script will be included in the head section of the page


  <script type="text/javascript" language="javascript"> 
$(function () { 
$("#ex01").click(function () { 
$('#ex01-body').showTopbarMessage(); 
}); 
$("#ex02").click(function () { 
 $('#ex02-body').showTopbarMessage({ close: 2000 }); 
 }); 
$("#ex03").click(function () { 
 $('#ex03-body').showTopbarMessage({ background: "#043", close: 2000 }); 
 }); 
$("#ex04").click(function () { 
 $('#ex04-body').showTopbarMessage({ height: "180px", close: 2000 }); 
 }); 
 }); 
</script>  


Following types of demonstrations are there:

1. Simple

  <p> 
<a href="javascript:void(0)" id="ex01">Simple</a>     </p> 
<pre>$("#ex01").click(function () { 
 $('#ex01-body').showTopbarMessage();   });</pre> 
 <div id="ex01-body" style="display: none;"> 
 This is a simple demo 
 <span style="font-size: small; cursor: pointer">(click to close)</span> 
 </div>  

2. Automatic close after some time.

  <p> 
 <a href="javascript:void(0)" id="ex02">Automatic close after some time</a> 
 </p>     <pre>$("#ex02").click(function () { 
 $('#ex02-body').showTopbarMessage({ close: 2000 });   });</pre> 
 <div id="ex02-body" style="display: none;"> 
 Automatic close after some time     </div>  

3. With custom background

  <p> 
 <a href="javascript:void(0)" id="ex03">With Custom background</a> 
 </p>     <pre>$("#ex03").click(function () { 
 $('#ex03-body').showTopbarMessage({ background: "#043", close: 2000 }); 
 });</pre>     <div id="ex03-body" style="display: none;"> 
 With Custom background     </div>  

4. Custom height with long text

 <p> 
 <a href="javascript:void(0)" id="ex04">Custom height with long text</a> 
 </p>     <pre>$("#ex04").click(function () { 
 $('#ex04-body').showTopbarMessage({ height: "180px", close: 2000 });   });</pre> 
 <div id="ex04-body" style="display: none;"> 
 Custom height with long text.<br /> 
 Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum 
 </div>  


Show Message Bar at the top of the page using HTML and jQuery

Posted by : Stranger
Date :Wednesday, February 13, 2013
With 0comments

ImageLens – A jQuery plug-in for Lens Effect Image Zooming

|
Read more »

ImageLens – A jQuery plug-in for Lens Effect Image Zooming

Posted by : Stranger
Date :
With 0comments
Tag : , ,

Create Tooltips, Modal Windows, Notice Messages using MooTools mBox library

| Tuesday, February 12, 2013
Read more »

mBox 0.2

mBox is a powerful library, helping you to easily create tooltips, modal windows, notice messages and more.
Styling is stress free with css and there are many options to customize position, appearance, events etc.

Check this out - mBox



Create Tooltips, Modal Windows, Notice Messages using MooTools mBox library

Posted by : Stranger
Date :Tuesday, February 12, 2013
With 0comments

Asp.Net Bind Populate DropDownList With JQuery And XML

| Saturday, February 9, 2013
Read more »
Check this out to bind the drop down with jquey n XML


Asp.Net Bind Populate DropDownList With JQuery And XML

Asp.Net Bind Populate DropDownList With JQuery And XML

Posted by : Stranger
Date :Saturday, February 9, 2013
With 0comments
Tag : , ,

jQuery Star Rating Plugin v3.14

|
Read more »

jQuery Star Rating Plugin v3.14

Posted by : Stranger
Date :
With 0comments
Prev
▲Top▲