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
Ïà¹ØÎĵµ£º
ASP.NET³ÌÐòÖг£ÓôúÂë»ã×Ü
1.×Ô¶¨ÒåÒì³£´¦Àí
//×Ô¶¨ÒåÒì³£´¦ÀíÀà
using System;
using System.Diagnostics;
namespace MyAppException
{
¡¡/// £¼summary£¾
¡¡/// ´ÓϵͳÒì³£ÀàApplicationException¼Ì³ÐµÄÓ¦ÓóÌÐòÒì³£´¦ÀíÀà¡£
¡¡/// ×Ô¶¯½«Òì³£ÄÚÈݼǼµ½Windows NT/2000µÄÓ¦ÓóÌÐòÈÕÖ¾
¡¡/// £¼/summary£¾
......
ASP.NET·ÀÖ¹SQL×¢È뺯Êý:
using System;
using System.Text.RegularExpressions;
using System.Web;
namespace FSqlKeyWord
......{
/**//**//**//// <summary>
/// SqlKey µÄժҪ˵Ã÷¡£
/// </summary>
public class S ......
ÓÐÈËÒ²ÎÊÁ˸öÔÚÏßͳ¼ÆµÄÎÊÌ⣬ÎҵļûÒâÊÇÕâÑùµÄ£º
ÔÚApplication_StartʼþÖмÓÈëÒÔÏ´úÂ룺
Application.Lock();
Application.["UserCount"]=0;
Application.Unlock();
Session_Startʼ ......
SQL
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
--°¢»áéªsosuo8.com¸ù¾ÝÍøÂçÉϵĴúÂë½øÐÐÁËÐ޸ģ¬°æȨ¹éÔ×÷ÕßËùÓÐ2009-4-5
--°¢»áéª×öÁËÒ»´ÎÉý¼¶£¬2009-9-27
--ÐÞ¸ÄÊä³ö×ܼǼÊý
ALTER PROCEDURE [dbo].[pagination]
@tblName nvarchar(1000), -- ±íÃû
......
Ê×ÏÈ·¨·½ÓÐ3¸ö£¬ÕâÀï¾Í˵2¸öʵÓõġ£¡£¡£
1£¬Ö±½ÓΪ ¿Ø¼þ innerhtml Ìí¼ÓÖµ
2£¬createElement £¨´´½¨COM£©
3£¬ºǫ́ NEW ¿Ø¼þ£¬Ìí¼Ó
ÕâÀï˵Ï 1£¬2 Á½¸ö·¨·½£¡
1£º
¶¯Ì¬Éú³É ×Ö·û´® string inntext=" <table> <tr> <td style=width:300px;text-align:right; >{0}<input id={1} type=text c ......