JavaScript

Friday 31 May 2013

Creat google map your website

<script type="text/javascript">
var map;
var infowindow;
 var k =0
var lat = [28.6312870,28.634244 ,28.634401,28.626969]
var lang =[77.2270520, 77.22220300000004, 77.222125,77.22228300000006]
var destination =['Lalit House', 'Nirulas', 'Costa Coffee','British Council']
function initialize()
{
  var pyrmont = new google.maps.LatLng(28.6312870, 77.2270520);
  map = new google.maps.Map(document.getElementById('googleMap'), {
    mapTypeId: google.maps.MapTypeId.ROADMAP,
    center: pyrmont,
    zoom: 15
  });

 
  infowindow = new google.maps.InfoWindow();
  var service = new google.maps.places.PlacesService(map);
  var placeLoc = '(28.6312870, 77.2270520)';
  for(var i =0 ; i< lat.length; i++)
    {
  if(i < lang.length){
  for(var j =0 ; j < lang.length; j++)
  {
  var items = new google.maps.LatLng(lat[i++],lang[j])
   if(j< destination.length){
    createMarker(items,destination[k])
        }
     k++;
      }
    }
  }
}
function createMarker(place,name)
{
  var marker = new google.maps.Marker({ map: map, position:place });
  google.maps.event.addListener(marker, 'click', function()
  {
    infowindow.setContent(name+"<div><a href=\"\">More Info</a></div>");
    infowindow.open(map, this);                 
  });
}
google.maps.event.addDomListener(window, 'load', initialize);

    </script>
<div id="googleMap" style="width:400px; height:300px;" runat="server"></div>

Tuesday 30 April 2013

Create XML file usign C# and then create sub node in existing file

 string file = @"c:\bb.xml";  
        // declearation 
       // parent node
        
        XmlElement subnode = xdoc.CreateElement("subnode");
       // Checking File Exist or not
        if (File.Exists(file))
        {
            xdoc.Load(@"C:\bb.xml");
            xdoc.DocumentElement.AppendChild(userinfo(txtuser.Text, txtpass.Text));
            xdoc.Save(file);
        }
        else
        {
            subnode.AppendChild(userinfo(txtuser.Text, txtpass.Text));
            xdoc.AppendChild(subnode);
            xdoc.InsertBefore(xdoc.CreateXmlDeclaration("1.0", "utf-8", null), subnode);
            xdoc.Save(file);
        }


// then create the xml node using this methods


XmlNode node = xdoc.CreateElement("Info");
        XmlNode user_node = xdoc.CreateElement("user");
        user_node.InnerText = user.ToString();
        node.AppendChild(user_node);
        XmlNode pass_node = xdoc.CreateElement("password");
        pass_node.InnerText = pass;
        node.AppendChild(pass_node);
        return node;

Friday 8 March 2013

Top 40 blog websites visit more and more visitors

    
 Top 40 blog websites visit more and more visitors

1. The Huffington Post
   
2. BuzzFeed - Latest

3. Mashable!

4. The Verge

5. Business Insider
   
6. Gawker

6. TechCrunch

8. Ars Technica

9. Engadget

10. Gizmodo

11. Breaking news and opinions on …

12. TMZ.com | Celebrity Gossip | …
   
13. L.A. NOW
   
14. The Next Web

15. Mediaite

16. Bits

17. Deadspin

18. Boing Boing

19. Jezebel
   
20. Deadline.com

21. Hot Air

22. Laughing Squid
   
23. SB Nation

24. ZeroHedge

25. The Opinionator

26 | HuffingtonPost


27 | TMZ


28 | BusinessInsider


29 | engadget

30 | PerezHilton


31| Gizmodo


32 | Mashable


33 | TechCrunch


34 | Gawker


35 | lifehacker


36 | The Daily Beast


37 | SmashingMagazine


39 | FailBlog


40 | Kotaku


41 | boingboing

Thursday 21 February 2013

First Application with MVC pattern in form submit app

First of you create mvc application
then you create view, controller, model class

then go the view page see the code in form submit


then go the model class
create you database class and property


then go Controller page create your logic

3

put into the controller class

Monday 18 February 2013

Fetch data using database in JSON form and populated with Dropdown lis


 first of create you asp.net application then attach the database

then create default.aspx page then define your code fetch the data in databse in Json format


then add your aspx page using jquery



Add  you jquery in header then call in function in body onload then work perfectelly