Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¹ØÓÚasp.netÓû§µÇ¼ȨÏÞ´úÂë

ÎÒÔÚ×öͼÊé¹ÜÀíϵͳ£¬Óû§¹ÜÀíȨÏÞ£¬ÔÚasp¡£netÀ²»ÓÃsessionµÄ»°£¬Ó¦¸ÃÓÃʲô´úÂë
protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            SqlConnection con = new SqlConnection();
            con.ConnectionString = "server=.\\sqlexpress;database=DB_Library;uid=sa;pwd=sa123";
            string strSql = "select *from manage where username='" + txtname.Text + "'and password='" + txtpwd.Text + "'";
            con.Open();
            SqlCommand cmd = new SqlCommand(strSql, con);
                  con.Close();
        }
        catch (SqlException sqle)
        {
        }
    }
    protected void btnOk_Click(object sender, EventArgs e)
    {
        string name = txtname.Text;
        string pwd = txtpwd.Text;
        bool i = db.CheckUser(name, pwd);
        
        if (i>0  )
        {              
                    Response.Write("<script language=javascript>alert('µÇ¼³É¹¦£¡'); location='libararyma


Ïà¹ØÎĵµ£º

ASP.NET JS³£Ó÷½·¨Àà

using System.Web;
/// <summary>
/// Javascript³£Ó÷½·¨
/// </summary>
public class JS
{
    private static string ScriptStart = "<script type=\"text/javascript\">";
    private static string ScriptEnd = "</script>";
  &n ......

ASP.NETÖÐΪGridViewÌí¼Óɾ³ýÌáʾ¿ò

ÔÚGridViewÖÐÎÒÃÇ¿ÉÒÔÖ±½ÓÌí¼ÓÒ»¸öCommandFieldɾ³ýÁÐÀ´É¾³ýijÐÐÐÅÏ¢¡£µ«ÎªÁ˱ÜÃâÎó²Ù×÷ÒýÆðµÄÎóɾ³ý£¬ÔÚɾ³ý²Ù×÷ÕßÈòÙ×÷ÕßÔÙÈ·ÈÏÏ£¬ÍêºóÔÙ½øÐÐɾ³ý¡£
¡¡¡¡Ê×ÏÈÎÒÃǸøÎÒÃǵÄGridView Ìí¼ÓÒ»¸öÄ£°åÁУ¬ÈçÏ£º
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
£¼ASP:TemplateField HeaderText="Delete" ShowHeader="False"£¾
£¼ItemStyle ......

ASP.NET ÈçºÎÈ¡µÃ Request URL µÄ¸÷個²¿·Ö?


ÎÒ們ÔÚ開發網頁應ÓóÌʽ£¬時³£ÐèҪȥ½âÎö網Ö·(Request.Url)µÄÿ個Ƭ¶Î£¬進ÐÐһЩÅÐ斷¡£ÀýÈç說 "http://localhost:1897/News/Press/Content.aspx/123?id=1#toc
"£¬ÎÒ們ÏëҪȡµÃ網Ö·裡µÚÒ»層Ä¿錄µ ......

asp.net·Ö²¿Àà(Partial Classes)

·Ö²¿Àà(Partial Classes)
C# 2.0 ¿ÉÒÔ½«Àà¡¢½á¹¹»ò½Ó¿ÚµÄ¶¨Òå²ð·Öµ½Á½¸ö»ò¶à¸öÔ´ÎļþÖУ¬ÔÚÀàÉùÃ÷Ç°Ìí¼Ópartial¹Ø¼ü×Ö¼´¿É¡£
ÀýÈ磺ÏÂÃæµÄPartialTestÀà
class PartialTest
{
string Str_FieldTest;
int Int_FieldTest;
public void DoTest()
{
Debug.Print("Test");
}
}
¿ÉÔÚ²»Í¬Ô´ÎļþÖÐд³ÉÏÂÃæÐÎʽ£º
Ò»¸ö ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ