C# Asp.NET Éú³ÉGOOGLEµØͼºÍË÷Òý
£¨1£©Ê×ÏÈÒª¶ÔÄÚÈݵÄÌØÊâ×Ö·û½øÐйýÂÇ£º
C# ´úÂ룺
public string res(string partno)
{
partno = partno.Replace("&", "");
partno = partno.Replace("/", "");
partno = partno.Replace("&", "");
return partno;
}
£¨2£©´ÓÊý¾Ý¿âÖлñµÃÒªÉú³ÉµØͼµÄÄÚÈÝ£º
C# ´úÂ룺
public void getXMLSitemapData(StreamWriter writerFile,int minid,int maxid)
{
SqlConnection mycon = new SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ConnectionString);
string sqlstr = "Select id,name from table where id>'" + minid + "' and id <'" + maxid + "'";//Êý¾Ý¿âÄÚÈÝÓï¾ä
SqlCommand cmd = new SqlCommand(sqlstr, mycon);
mycon.Open();
SqlDataReader rdr = cmd.ExecuteReader();
if (rdr.HasRows)
{
while (rdr.Read())
{
writerFile.WriteLine("<url>");
writerFile.WriteLine("<loc>" + "http://www.uni888.com/" + res(rdr[1].ToString())+".html" + "</loc>");
writerFile.WriteLine("<lastmod>" +"2009-04-22"+ "</lastmod>");
writerFile.WriteLine("<changefreq>weekly</changefreq>");
writerFile.WriteLine("<priority>1.0</priority>");
writerFile.WriteLine("</url>");
}
}
rdr.Close();
mycon.Close();
}
(3)´´½¨²¢Ð´Èësitemaps.xml GOOGLEµØͼ
C# ´úÂ룺
public void createXMLSitemap(int minid,int maxid,int maps)
{
FileInfo XMLFile = null;
StreamWriter WriteXMLFile = null;
string FilePath = HttpContext.Current.Server.MapPath("sitemap"+maps+".xml");
XMLFile = new FileInfo(FilePath);
WriteXMLFile = XMLFile.CreateText();
//ÏÂÃæÁ½¾ä»°±ØÐëд£¬¶øÇÒ²»ÄÜ×öÈκÎÐÞ¸Ä
WriteXMLFile.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
WriteXMLFile.Wri
Ïà¹ØÎĵµ£º
ʾÀýÒ»
ÔÚGlobal.asax.csÎļþÖУº
protected void Application_Start(Object sender, EventArgs e)
{
System.Timers.Timer timer1 = new System.Timers.Timer();
&nbs ......
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
´«ËͲÎÊý£º
response.write("£¼script£¾window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')£¼/script£¾")
½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1.Attribute ......
OAÔ´ÂëΪÎÒ¹¤×÷ÊÒ¾«ÐÄ´òÔì,ÓÃÁËÈýÄêµÄʱ¼ä,²ÅÐÞÕýÍêÉƵĴóÐͰ칫ϵͳ.
Ϊ¶ÀÁ¢¿ª·¢,²»´æÔÚ°æȨ¾À·×,²»»á¸øÄú´øÀ´Âé·³,´úÂëÍêÕû£¬Öø×÷ȨµÇ¼ÇºÅ£º2008SR14608.
OA×îÐÂÉý¼¶£¬¹¤×÷Á÷¸üÇ¿´ó£¬±íµ¥¶¨Òå¸üÎȶ¨
ÇëÈÏ×¼ÁªÏµ·½Ê½£¬½÷·À¼Ùð¡£
Ϊ½ÚÔ¼¿ª·¢³É±¾£¬OAÔ´Âë¿ÉÒÔ·ÖÄ£¿é½øÐÐÌṩ
ÓÀ¾Ãά»¤£¬Óг¥2´Î¿ª·¢
Èí¼þ¹¦ÄÜ·ÖΪרҵ° ......
function ImportRun()
{
if(document.all.Content.children.length>0)
{
var oTable=document.all.Content.children(0);
var oFldInfo=new Array();
var oSendDom=CreateXmlDom("<dl/>");
&nb ......