C# asp.net macaddr
<HTML><HEAD><TITLE>WMI Scripting HTML</TITLE>
<META http-equiv=Content-Type c>
<SCRIPT language=JScript event="OnCompleted(hResult,pErrorObject, pAsyncContext)" for=foo>
var MACaddress=unescape(MACAddr);
alert(MACaddress);
document.forms[0].txtMACAddr.value=unescape(MACAddr);
//document.formbar.submit();
</SCRIPT>
<META c name=GENERATOR></HEAD>
<BODY>
<SCRIPT language=JScript event=OnObjectReady(objObject,objAsyncContext) for=foo>
if(objObject.IPEnabled != null && objObject.IPEnabled != "undefined" && objObject.IPEnabled == true){
if(objObject.MACAddress != null && objObject.MACAddress != "undefined")
MACAddr = objObject.MACAddress;
}
</SCRIPT>
<OBJECT id=locator classid=CLSID:76A64158-CB41-11D1-8B02-00600806D9B6 VIEWASTEXT></OBJECT>
<OBJECT id=foo classid=CLSID:75718C9A-F029-11d1-A1AC-00C04FB6C223></OBJECT>
<SCRIPT language=JScript>
var service = locator.ConnectServer();
var MACAddr ;
service.Security_.ImpersonationLevel=3;
service.InstancesOfAsync(foo, 'Win32_NetworkAdapterConfiguration');
</SCRIPT>
<FORM id="formfoo" name="formbar" method="post"><INPUT value="77" name="txtMACAddr">
</FORM></BODY></HTML>
Ïà¹ØÎĵµ£º
´íÎóÐÅÏ¢£º
»Ø·¢»ò»Øµ÷²ÎÊýÎÞЧ¡£ÔÚÅäÖÃÖÐʹÓà <pages enableEventValidation="true"/> »òÔÚÒ³ÃæÖÐʹÓà <%@ Page EnableEventValidation="true" %> ÆôÓÃÁËʼþÑéÖ¤¡£³öÓÚ°²È«Ä¿µÄ£¬´Ë¹¦ÄÜÑéÖ¤»Ø·¢»ò»Øµ÷ʼþµÄ²ÎÊýÊÇ·ñÀ´Ô´ÓÚ×î³õ³ÊÏÖÕâЩʼþµÄ·þÎñÆ÷¿Ø¼þ¡£Èç¹ûÊý¾ÝÓÐЧ²¢ÇÒÊÇÔ¤Æڵģ¬ÔòʹÓà ClientScriptMan ......
asp.net(C#)ʵÏÖSQL2000Êý¾Ý¿â±¸·ÝºÍ»¹Ô
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.Htm ......
ASP.NET²Ù×÷Êý¾Ý¿â
ͨ¹ý¶ÔADO.NETµÄ»ù±¾½²½â£¬ÒÔ¼°½²½âÁËһЩÊý¾ÝÔ´¿Ø¼þµÄ»ù±¾Ó÷¨ºó£¬±¾Õ½«½éÉÜһЩASP.NET²Ù×÷Êý¾Ý¿âµÄ¸ß¼¶Ó÷¨£¬°üÀ¨Ê¹ÓÃSQLHelper£¬ÒÔ¼°Êý¾ÝÔ´¿Ø¼þ¶ÔÊý¾ÝµÄ²Ù×÷¡£±¾ÕÂÊǶÔÇ°ÃæµÄÊý¾Ý¿â֪ʶµÄÒ»ÖÖ²¹³äºÍÌáÉý¡£
9.1 ʹÓÃADO.NET²Ù×÷Êý¾Ý¿â
ÉÏÒ»ÕÂÖнéÉÜÁËADO.NETµÄ»ù±¾¸ÅÄî¡¢ADO.NETµÄ¶ÔÏó£¬ÒÔ¼ ......
1.»ñȡͼƬ¿í¶ÈºÍ¸ß¶È
1.Äú¿ÉÒÔʹÓà System.Drawing.Image Àà
System.Drawing.Image img = System.Drawing.Image.fromFile(Server.MapPath("example.gif"));
int width = img.Width;
int height = img.Height;
img.Dispose();
µ«ÊÇÕâÀïÎÒÃÇÈ´²»ÄÜÔÚµ¼ÈëÃû³Æ¿Õ¼äºóʹÓà Image& ......
System.Drawing.Image watermark = System.Drawing.Image.fromFile(Server.MapPath("watermark.gif"));
Bitmap srcImg = new Bitmap(Server.MapPath("example.jpg"));
Graphics graphics = Graphics.fromImage(srcImg);
graphics.DrawImage(watermark,
srcImg.Width - watermark.Width,
srcImg.Height - w ......