asp.netÒ³ÃæÎÞ·¨»ñµÃÊý¾Ý¿âµÄÖµ
Êý¾Ý¿âÄÜÁ¬½Ó£¬Èç¹û²»¼ÓwhereÌõ¼þtxtKeyword.Text ¿ÉÒÔÏÔʾ¡°keyWords¡±Öµ£¬µ«¼ÓÉÏwhereÓÉÎı¾¿òÊäÈëµÄÌõ¼þ¾Í²»Äܵõ½Êý¾Ý¿âµÄÖµÁË£¬ÎªÊ²Ã´ÄØ£¿
protected void txtProperTitle_TextChanged(object sender, EventArgs e)
{
string strConn = " Server=xiao\\SQLEXPRESS;Initial Catalog=catalogue;User ID=sa;Password=123";
SqlConnection cn = new SqlConnection(strConn);
string SqlString = "select keyWords from dbo.cat where name="+txtProperTitle.Text;
try
{
cn.Open();
SqlCommand objCommand = new SqlCommand(SqlString, cn);
SqlDataReader objReader = objCommand.ExecuteReader();
while (objReader.Read())
{
txtKeyword.Text = objReader.GetString(0);
}
cn.Close();
}
catch (Exception e2)
{
 
Ïà¹ØÎÊ´ð£º
aspÏÂÃæ£¬µ±Òª¸ù¾Ý²»Í¬µÄȨÏÞÏÔʾһЩ¹¦Äܰ´Å¥µÄ»°»áд³É
<%
if ȨÏÞ=1 then
%>
<input type="submit" name="Submit" value="Ìá½»" />
<%
end i ......
ÔÚµ¯³ö¿òÖеã»÷Ò»¸ö°´Å¥£¬Ôõôµ÷תµ½ÁíÒ»¸öä¯ÀÀÆ÷£¬²¢ÇÒÔÚ¸Ãä¯ÀÀÆ÷´ò¿ªÁ½¸öÒ³Ãæ
ÄãµÄÒâ˼Ӧ¸ÃÊÇ
response.write("<script>alert('È·ÈÏ'); window.location.href('xxxx.aspx'); </script>"); ......
ÇëÎÊһϣ¬ASP.NETÎÒÓÃÒ»¸ö²ãÖзÅÁËÒ»¸öÈÕÀú¿Ø¼þ£¬ÔÚµãÒ»¸ö°´Å¥Ê±£¬ÏÔʾÕâ¸ö²ã£¿ÏÖÔÚÎÊÌâÊÇÎÒÔڵ㰴ťʱ£¬ÎÒÏë°Ñ²ãÏÔʾÔÚ°´Å¥µÄÏ·½£¿¾ÍÏñÏÂÀÈÕÆÚ¿Ø¼þÒ»Ñù£¬ÎÒÓÃÊǵÄASP.NET C#
ÎÒÓÐÕâôһ¸öÈÕÆÚ¿Ø¼þ£¬£¡µã»÷¿ÉÒÔÑ ......