c# asp.netͳ¼ÆÍøÕ¾µ±Ç°ÔÚÏßÈËÊýµÄÎÊÌâ
ÎÒÏëͳ¼ÆÍøÕ¾µ±Ç°ÔÚÏßÈËÊý£¬µÚÒ»´Î´ò¿ªÍøÕ¾Ê±ÈËÊý+1£¬µ±ä¯ÀÀÆ÷¹Ø±ÕʱÈËÊý-1£¬µÚ¶þ´ÎÔٴνøÈëÍøÕ¾ºóÈËÊý²»¼Ó£¬ÎÒµÄÈ«¾Ö±äÁ¿Application["counter"]µÄ´úÂ룺
void Application_Start(object sender, EventArgs e)
{
// ÔÚÓ¦ÓóÌÐòÆô¶¯Ê±ÔËÐеĴúÂë
Application["count"] = 0;
}
void Session_Start(object sender, EventArgs e)
{
// ÔÚлỰÆô¶¯Ê±ÔËÐеĴúÂë
Application.Lock();
Application["count"] = (int)Application["count"] + 1;
Application.UnLock();
}
void Session_End(object sender, EventArgs e)
{
// ÔڻỰ½áÊøÊ±ÔËÐеĴúÂë¡£
Application.Lock();
Application["count"] = (int)Application["count"] - 1;
Application.UnLock();
}
protected void Page_Load(object sender, EventArgs e)
{
//µ±Ç°ÔÚÏßÈËÊý
Label14.Text = string.Format("µ±Ç°ÔÚÏßÈË
Ïà¹ØÎÊ´ð£º
//C ½Ó¿Ú
extern "C"
{
TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);
}
//ÎÒÔÚC#ÖÐÉùÃ÷
//µ÷ÓÃC DLL Öеĺ¯Êý
[DllImport("OCRapi.dll&quo ......
select top 12 * from Product where [id] not in (select top 12 [id] from Product)
ÕâÑù¿ÉÒÔ·ÖÒ³£¬µ«ÊÇÎÒÔÚºóÃæÏë¼Ó¸öÌõ¼þ
select top 12 * from Product where [id] not in (select top 12 [id] from Prod ......
ÎÒÔÚ Page_Load ÀïдÁË
if(!IsPostBack){
GridView1.DataSource=GroupManager.GetGroups();//GetGroups ·µ»ØµÄÊÇ IList<Group>
GridView1.DataBind();
}
¿ÉÎÒÔÚ Submit_Click Àïд´ú ......
ÔÚµ¯³ö¿òÖеã»÷Ò»¸ö°´Å¥£¬Ôõôµ÷תµ½ÁíÒ»¸öä¯ÀÀÆ÷£¬²¢ÇÒÔÚ¸Ãä¯ÀÀÆ÷´ò¿ªÁ½¸öÒ³Ãæ
ÄãµÄÒâ˼Ӧ¸ÃÊÇ
response.write("<script>alert('È·ÈÏ'); window.location.href('xxxx.aspx'); </script>"); ......
VB.NET code:
'Global.asax
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
'ÔÚÓ¦ÓóÌÐòÆô¶¯Ê±ÔËÐеĴúÂë
Dim RequestUrl As String = HttpContext.Current.Requ ......