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

asp.net µ÷ÓÃÍⲿ³ÌÐò


Process p = new Process();
p.StartInfo.FileName = "cmd.exe"; //設¶¨³ÌÐòÃû
p.StartInfo.Arguments = "/c " command; //設¶¨³Ìʽ執ÐÐ參數
p.StartInfo.UseShellExecute = false; //關閉ShellµÄʹÓÃ
p.StartInfo.RedirectStandardInput = true; //Öض¨Ïò標準輸Èë
p.StartInfo.RedirectStandardOutput = true; //Öض¨Ïò標準輸³ö
p.StartInfo.RedirectStandardError = true; //Öض¨Ïò錯誤輸³ö
p.StartInfo.CreateNoWindow = true; //設Öò»顯ʾ´°¿Ú

p.Start(); //啟動
//p.StandardInput.WriteLine(command); //Ò²¿ÉÒÔÓÃ這種·½Ê½輸ÈëÒª執ÐеÄÃüÁî
//p.StandardInput.WriteLine("exit"); //²»過Òª記µÃ¼ÓÉÏExitÒª²»È»ÏÂÒ»ÐгÌʽ執ÐеÄ時ºò會當機
return p.StandardOutput.ReadToEnd(); //從輸³öÁ÷È¡µÃÃüÁî執ÐÐ結¹û


Ïà¹ØÎĵµ£º

ASP.NETÖеķþÎñÆ÷¿Ø¼þºÍ¿Í»§¶Ë¿Ø¼þ

 1. ·ÃÎÊ HTML¿Ø¼þµÄÖµÊÇvalueÊôÐÔ
     ·ÃÎÊ ASP.NET¿Ø¼þµÄÖµÊÇtextÊôÐÔ
 --------------------------------------------------------
2.·Ö±ðÐèÒªµÄÃû×Ö¿Õ¼äΪ£º
using System.Web.UI.HTML.Controls;
using System.Web.UI.WebControls;
-------------------------------------------- ......

ASP.NETÒ³ÃæµÄCheckBoxList×é¼þ

CheckBoxÑ¡Ôñ×é¼þÊÇÒ»¸ö³ÌÐòÖж¼¾­³£µÄ×é¼þ¡£ÔÚ³ÌÐòÉè¼ÆÖÐʹÓõ½¸Ã×é¼þ£¬Ò»°ã¶¼²»»áֻʹÓõ½Ò»¸ö£¬ÍùÍùÊÇÒÔ¶à¸ö´ËÀà×é¼þµÄÐÎʽ³öÏֵġ£ÔÚASP.NETÒ³ÃæÖÐÈç¹ûҪʹÓõ½¶à¸öCheckBox×é¼þ£¬³ýÁËÌí¼Ó¶à¸öCheckBox×é¼þÔÚÒ³ÃæÖÐÖ®Í⣬»¹ÓÐÒ»ÖֱȽϷ½±ãµÄ·½·¨£¬¾ÍÊÇʹÓÃCheckBoxList ×é¼þ¡£CheckBoxList×é¼þÊÇÓÉÒ»×éµÄCheckBox×é¼þ×é ......

ASP.NET MVC¹Ù·½Ö¸ÄÏѧϰ×ܽá

MVC¿ò¼ÜͼÈçÏ£º
ÔÚÄã¾ö¶¨Ê¹ÓÃMVC¿ò¼Ü»òWeb Formsģʽ¿ª·¢Ö®Ç°£¬ÇëÈÏÕæºâÁ¿Ò»Ï¸÷×ÔµÄÓŵ㡣
»ùÓÚMVCµÄWebÓ¦ÓóÌÐòÓŵ㣺
ËüÄܺÜÈÝÒ׵ĹÜÀí¸´ÔÓµÄÓ¦ÓóÌÐò£¬½«Ëü·ÖΪmodel£¬viewºÍcontroller¡£
Ëü²»ÄÜʹÓÃview stateºÍ·þÎñÆ÷¿Ø¼þ£¬ÕâʹµÃMVC¿ò¼Ü¿ª·¢ÈËÔ±ÓµÓжÔÓ¦ÓóÌÐòÍêÈ«¿ØÖƵÄÄÜÁ¦¡£
ËüʹÓÃÇ°¶Ë¿ØÖÆÆ÷ģʽ£¬Í¨¹ýµ¥Ò ......

asp.netÖÐÔõÑùµ÷Óô洢¹ý³ÌºÍ´æ´¢¹ý³ÌµÄд·¨

----´´½¨Ò»¸öÖ»ÓÐÊäÈë²ÎÊýµÄ´æ´¢¹ý³Ì
create procedure proc_user
@name varchar(20),
@Password varchar(100)
as
select * from loginuser
where name like @name
---´´½¨Ò»¸öÓÐÊäÈëºÍÊä³ö²ÎÊýµÄ´æ´¢¹ý³Ì
create procedure proc_usertext
@name varchar(20),
@blog varchar(100) output
as
select @blog = ......

asp.net Ò³Ãæ»ùÀàÒì³£²¶»ñ

ÔÚÒ³Ãæ»ùÀàÖÐÔö¼ÓÒÔÏ·½·¨,Äܹ»»ñµÃ±Èoverride void OnError(EventArgs e)¸ü¸ßµÄ´íÎó´¦ÀíÓÅÏȼ¶ºÍ¿ØÖÆȨ,override void OnError(EventArgs e)·½Ê½ÖÐOnError±»Ö´ÐÐÍê±Ïºó»ùÀà(Page)µÄOnErrorÔÚºóÐø±»µ÷ÓÃ,µ±Ç°Ò³ÃæË漴ɥʧ¿ØÖÆȨ.    
protected void Page_Error(object sender, EventArgs e)
{
&nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ