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

ASP.NETÖÐCheckBoxµÄʹÓÃ

 Ò»¡¢Ôõô½«CheckBoxµÄÖµ´æ´¢ÔÚÊý¾Ý¿âÖУ¬¼´Ò»¸öCheckBox±»Ñ¡¶¨ºó£¬ÈçºÎÔÚÊý¾Ý¿âÖбíʾÕâÖÖÑ¡¶¨£¿
Ê×ÏÈÔÚÊý¾Ý¿âÖж¨Ò弸ÁÐbitÀàÐ͵ÄÊý¾ÝÁУ¬ÓÃÀ´±íʾij¸öCheckBoxÊÇ·ñ±»Ñ¡¶¨£¬Êý¾Ý¿âÖеÄֵΪtrue»òfalse.
ǰ̨´úÂ룺
    ÊÇ·ñÍÆ¼ö£º<asp:CheckBox ID="IsRecommend" runat="server" />
    <br />
    ÊÇ·ñÈÈÂô£º<asp:CheckBox ID="IsHot" runat="server" />
    <br />
    ÊÇ·ñ²ÎÓë´òÕÛ£º<asp:CheckBox ID="IsSale" runat="server" />
    <br />
ºǫ́´úÂ룺
        //ÊÇ·ñÍÆ¼öµÄÅжÏ
        bool isrecommend;
        if (IsRecommend.Checked)
        {
            isrecommend = true;
        }
        else
        {
            isrecommend = false;
        }
        //ÊÇ·ñ´òÕÛµÄÅжÏ
        bool issale;
        if (IsSale.Checked)
        {
            issale = true;
        }
        else
        {
            issale = false;
        }
        //ÊÇ·ñÈÈÂôµÄÅжÏ
        bool ishot;
        if (IsHot.Checked)
        {
   &nbs


Ïà¹ØÎĵµ£º

ASP.NETÖг£ÓõÄ26¸öÓÅ»¯ÐÔÄÜ·½·¨(20


21. Ö»ÔÚ±ØÒªÊ±±£´æ·þÎñÆ÷¿Ø¼þÊÓͼ״̬ ¡¡¡¡
×Ô¶¯ÊÓͼ״̬¹ÜÀíÊÇ·þÎñÆ÷¿Ø¼þµÄ¹¦ÄÜ£¬¸Ã¹¦ÄÜʹ·þÎñÆ÷¿Ø¼þ¿ÉÒÔÔÚÍù·µ¹ý³ÌÉÏÖØÐÂÌî³äËüÃǵÄÊôÐÔÖµ(Äú²»ÐèÒª±àдÈκδúÂë)¡£µ«ÊÇ£¬ÒòΪ·þÎñÆ÷¿Ø¼þµÄÊÓͼ״̬ÔÚÒþ²ØµÄ´°Ìå×Ö¶ÎÖÐÍù·µÓÚ·þÎñÆ÷£¬ËùÒԸù¦ÄÜȷʵ»á¶ÔÐÔÄܲúÉúÓ°Ïì¡£ÄúÓ¦¸ÃÖªµÀÔÚÄÄЩÇé¿öÏÂÊÓͼ״̬»áÓÐËù°ïÖú£¬ÔÚÄÄÐ ......

Asp.net ÖÐ GetºÍPost µÄÓ÷¨

 ±íµ¥formµÄÌá½»ÓÐÁ½ÖÖ·½Ê½£¬Ò»ÖÖÊÇgetµÄ·½·¨£¬Ò»ÖÖÊÇpost µÄ·½·¨.¿´ÏÂÃæ´úÂë,Àí½âÁ½ÖÖÌá½»µÄÇø±ð:
1 <form id="form1" method="get" runat="server">
2     <div>
3          ÄãµÄÃû×Ö<asp:TextBox ID="name" runat="server">< ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ