分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
网上很多都是通过百度地图API调用JS的例子,并没有真正的数据库交互哦~所以我做了一个与sql server数据库交互的例子。数据库用的是sql server,大家看着自行建立数据库哦~~
首先,我们建立一个default.aspx
![](http://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
![](http://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif)
1 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 2 3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 4 5 <html xmlns="http://www.w3.org/1999/xhtml" > 6 <head runat="server"> 7 <title></title> 8 <style type ="text/css" > 9 table { 10 border: solid 1px #999; 11 } 12 13 </style> 14 <style type="text/css"> 15 html,body{ margin:0;padding:0;} 16 .iw_poi_title { color:#CC5522;font-size:14px;font-weight:bold;overflow:hidden;padding-right:13px;white-space:nowrap} 17 .iw_poi_content { font:12px arial,sans-serif;overflow:visible;padding-top:4px;white-space:-moz-pre-wrap;word-wrap:break-word} 18 .auto-style1 { 19 width: 87px; 20 height: 27px; 21 } 22 .auto-style2 { 23 width: 417px; 24 height: 27px; 25 } 26 </style> 27 <script type="text/javascript" src="http://api.map.baidu.com/api?key=46ce9d0614bf7aefe0ba562f8cf8719&v=1.1&services=true"></script> 28 29 <script type ="text/javascript" > 30 function getAddr() 31 { 32 var map=document.getElementById ("dituContent"); 33 if(map.style.display=="none") 34 { 35 map.style.display="block"; 36 initMap(); 37 } 38 if(map.style.display!="none") 39 { 40 initMap(); 41 } 42 43 } 44 </script> 45 </head> 46 <body style ="font-size :12px"> 47 <form id="form1" runat="server"> 48 <div> 49 经:<asp:TextBox ID="lng" runat="server" style="" Width="108px" ></asp:TextBox> 50 纬:<asp:TextBox ID="lat" runat="server" Width="102px" ></asp:TextBox> 51 <div style =" float :left "> 52 <table style="width: 600px; height: 327px; "> 53 <tr> 54 <td style="width: 87px"> 55 名称:</td> 56 <td style="width: 417px"> 57 <asp:TextBox ID="name" runat="server"></asp:TextBox> 58 <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="name" 59 ErrorMessage="公司名称不能为空!" Font-Size="Small"></asp:RequiredFieldValidator></td> 60 61 </tr> 62 <tr> 63 <td class="auto-style1"> 64 城市:</td> 65 <td class="auto-style2"> 66 <asp:DropDownList ID="city" runat="server"> 67 <asp:ListItem Value ="北京">北京<