asp.netµ÷ÓÃbatÎļþ
ÒýÓÃÃüÃû¿Õ¼ä
using System.Diagnostics;
string sPath = "d:\\test\\test.bat";
string sDict = "d:\\test\\";
ProcessStartInfo psi = new ProcessStartInfo("cmd.exe");
psi.UseShellExecute = false;
psi.RedirectStandardOutput = true;
psi.RedirectStandardInput = true;
psi.RedirectStandardError = true;
psi.Arguments = sPath;
psi.WorkingDirectory = sDict;
// Start the process
System.Diagnostics.Process proc = System.Diagnostics.Process.Start(psi);
// Attach the output for reading
System.IO.StreamReader sOut = proc.StandardOutput;
proc.Close();
// Read the sOut to a string.
string results = sOut.ReadToEnd().Trim();
sOut.Close();
// Write out the results.
string fmtStdOut = "<font face=courier size=0>{0}</font>";
this.Response.Write(String.Format(fmtStdOut, results.Replace(System.Environment.NewLine, "<br />")));
Ïà¹ØÎĵµ£º
foreach(Control con in this.Controls[1].Controls)
{
if(con is TextBox)
{
((TextBox)con).Text="";
}
}//Õâ¶Î´úÂëÖ´Ðгɹ¦£¬µ«ÎÒ²»Ã÷°×ÕâÀïµÄ1´úÂëʲô£¿
µ«ÊÇ» ......
ÔÚGlobal.asaxÖе¼ÈëÃüÃû¿Õ¼ä
<%@Global ...
<%@Import Namespace= "System.Data " %>
<%@Import& ......
´Ë´¦ÌṩµÄ´úÂëÓÃÀ´ÊµÏÖµ±asp.netÒ³ÃæÖеÄij¸öButton±»µã»÷ºódisableµô¸ÃÒ³ÃæÖÐËùÓеÄButton£¬´Ó¶ø·ÀÖ¹Ìá½»ÑÓʱµ¼ÖµĶà´ÎÌá½»¡£»ùÓÚ֮ǰµÄonceclickbutton½Å±¾.
//ASP.NETÖзÀÖ¹Ò³Ãæ¶à´ÎÌá½»µÄ´úÂë:javascript< script language=”javascript”> < !– function disableOtherSubmit() {
var obj ......
asp.netÖÐ×öÊÓÆµ×ª»»£¬½«¸÷ÖÖÊÓÆµÎļþת»»³É.flv¸ñʽ ×öÒ»¸öÊÓÆµ×ª»»µÄDemo,ÏÖÔÚ³öÏֺܵÄÍøÉÏÔÚÏßÊÓÆµÆäÎļþ¸ñʽ¶¼ÊÇ.FLV¸ñʽ£¬ÄÇЩÊÓÆµÍøÕ¾´ó¸ÅÒ²ÓÐÒ»¸öÊÓÆµ×ª»»Èí¼þ£¬ËùÎÒÔÚÒ²ÊÔ×ÅÈ¥×öÁËÒ»¸ödemoÄóöÀ´ºÍ´ó¼Ò¹²Ïíһϣ¬ÓÉÓÚ×Ô¼ºµÄ¼¼ÊõÓÐÏÞ£¬×öµÄ²»ÔõôÑù£¬Ô¸ÓиßÈË¿´Íê¸ø
ÔÚÏÂÖ¸µãÒ»¶þ. ºÇ....¡¡·Ñ»°²»¶à˵ÁË£¬ÏÂÃæÀ´·Ö½ ......