ÔÚASPÖгöÏֻط¢»ò»Øµ÷²ÎÊýÎÞЧ - .NET¼¼Êõ / ASP.NET
ÎÒÔÚʹÓÃasp×ö½»Ò×ϵͳʱÔÚdatalistÖн¨Ä£°å£¬ÆäÖзÅÁËÒ»¸öbotton¿Ø¼þ£¬¹¦ÄÜÊǵ¥»÷ËüÌøתµ½ÁíÒ»½çÃ棬ÔÚËûµÄclikʼþÖÐÓÃrespons.write£¨¡°..aspx¡±£©Ìøת£¬ÔÚµ¥»÷Ö®ºó³öÏÖÁ˻ط¢»ò»Øµ÷²ÎÊýÎÞЧµÄ´íÎ󣬸ÃÔõÑù¸Ã°¡£¿£¿£¿¸ßÊÖ°ïæ
´íÎóÌáʾ
{
»Ø·¢»ò»Øµ÷²ÎÊýÎÞЧ¡£ÔÚÅäÖÃÖÐʹÓà <pages enableEventValidation="true"/> »òÔÚÒ³ÃæÖÐʹÓà <%@ Page EnableEventValidation="true" %> ÆôÓÃÁËʼþÑéÖ¤¡£³öÓÚ°²È«Ä¿µÄ£¬´Ë¹¦ÄÜÑéÖ¤»Ø·¢»ò»Øµ÷ʼþµÄ²ÎÊýÊÇ·ñÀ´Ô´ÓÚ×î³õ³ÊÏÖÕâЩʼþµÄ·þÎñÆ÷¿Ø¼þ¡£Èç¹ûÊý¾ÝÓÐЧ²¢ÇÒÊÇÔ¤Æڵģ¬ÔòʹÓà ClientScriptManager.RegisterForEventValidation ·½·¨À´×¢²á»Ø·¢»ò»Øµ÷Êý¾ÝÒÔ½øÐÐÑéÖ¤¡£
}
·ÖÊýÓÐÏÞ£¬Ñ§Ï°ÖØÒª°¡
ÄÇÄã¾Í°Ñ<pages enableEventValidation="true"/>ÉèÖÃΪ<pages enableEventValidation="false"/>ÄãpostµÄÄÚÈÝÖÐÓ¦¸Ã°üº¬ÓÐhtml´úÂë°É/...
ÔÚËûµÄclikʼþÖÐÓÃrespons.write£¨¡°..aspx¡±£©Ìøת¡¢¡¢
respons.redirect("sss.aspx")
µÚÒ»´Î¿´µ½ÓÐÈËÓÃrespons.writeÌøתҳÃæ
Äã´ò¿ªÄãµÄÎļþÓÃhtml£¬¿´¿´ÄãµÄÒ³ÃæÊDz»ÊÇдÔÚÁ˵ÚÒ»ÐÐÉÏÁË
ÕâÑùµ±È»¾Í³ö·¢ÁËÒ³ÃæÑéÖ¤enableEventValidation
¸Ä³É Response.Redirect("sss.aspx",true);°É
Ïà¹ØÎÊ´ð£º
function CheckOpwd(){//ÑéÖ¤Óû§Ãû
var pwd=document.all.txtOpwd;
var div1=document.getElementById("divPwd");
if (pwd.value=="")
{
......
C# code:
SqlConnection conn = CsDB.sqlcon();
SqlDataAdapter da = new SqlDataAdapter("select fwCoding from bjmuma_fwCoding where OrderNumber='" + Order + & ......
ÎÒÓÐÁ½¸ödropdownlist¶¼°óºÃÁËÖµ£¬ÏëÑ¡ÖÐÒ»¸ödropdownlistÖеÄÖµ£¬È»ºóÔÚÁíÒ»¸ödropdownlistÖÐÑ¡ÖÐÏàÓ¦µÄÒ»Ïî¡£
²»ÊÇ´Óа󶨵ڶþ¸ödropdownlist£¬ÊÇÔÚÒѾ°óºÃµÄÖµµ±ÖÐÑ¡ÖÐÒ»¸ö¡£
ÎÒÏëÓÃjsд
ÇóÖú
Äã¿ÉÒÔ°Ñdrop ......
ÎÒ×î½ü×öÁËÒ»¸öÍøÕ¾ÊǹØÓÚ²úƷչʾµÄ ~ Õû¸öÍøվͼƬ¶¼Õ¼ÓÃÁËÒ»´ó°ë
ÕâÑùµÄ»°·ÃÎÊËٶȾͷdz£Âý ÓÐʲô°ì·¨¿ÉÒÔ½â¾öÂð£¿
Âé·³´ó¼Ò¶à¶à¸øµãÒâ¼û £¡ ÓÐʲô¾¡¹Ü˵
3Q´ó¼Ò
htmlÒ³Ãæ.
Õâ¸ö,¼ÈÈ»Ö÷Ò ......