ASP.NETÊý¾Ý°ó¶¨_µÚÈýƪ_ÓÃObjectDataSource¿Ø¼þ°ó¶¨
+++ Ò³Ãæ´úÂëÈçÏ£º
<asp:GridView ID="GridView1" runat="server" DataSourceID="ObjectDataSource1"
AutoGenerateColumns="true" DataKeyNames="EMPNO">
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetEmp" TypeName="OraEmp">
</asp:ObjectDataSource>
+++ ºǫ́´úÂëÈçÏ£º
// ×Ô¶¨ÒåÀࣺ
using System;
using System.Data;
using System.Configuration;
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.HtmlControls;
using System.Data.OracleClient;
using System.ComponentModel;
public class OraEmp
{
public OraEmp()
{ }
[DataObjectMethod(DataObjectMethodType.Select, true)]
public DataTable GetEmp()
{
string connStr = "Data Source=ora9; uid=scott; pwd=tiger; unicode=true";
string sqlStr = "SELECT * from EMP";
OracleDataAdapter da = new OracleDataAdapter(sqlStr, connStr);
DataTable dt = new DataTable();
da.Fill(dt);
return dt;
}
}
+++ ˵Ã÷£º
(1) ±¾ÀýʹÓÃObjectDataSource¿Ø¼þ½øÐа󶨣¬Õâ¸ö¿Ø¼þ±ÈSqlDataSource¿Ø¼þ¸ü¼Ó³éÏó£»
(2) Ê×ÏÈ×Ô¶¨ÒåÒ»¸öÀàOraEmp£¬Ìí¼Ópublic DataTable GetEmp()·½·¨£¬×¢Òâ·µ»ØÀàÐÍΪDataTable£»
(3) ÁíÍâÔÚÀàOraEmpÖУ¬ÎªÁËʹÓÃObjectDataSource£¬ÐèÒªÌí¼Ó[DataObjectMethod(DataObjectMethodType.Select, true)]Óï¾ä£¬´ËÓï¾äÐèÒªSystem.ComponentModelÃüÃû¿Ø¼þ£»
(4) ×îºóÉèÖÃObjectDataSource¿Ø¼þµÄSelectMethod="GetEmp"ºÍTypeName="OraEmp"ÊôÐÔ¡£
Ïà¹ØÎĵµ£º
ͨ³£ÎÒÃǶ¼Í¨¹ýÏÂÃæµÄ´úÂë»ñµÃIP:
string ip =System.Web.HttpContext.Current.Request.UserHostAddress;
»ò string ip =System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
REMOTE_ADDR ˵Ã÷£º
·ÃÎÊ¿Í»§¶ËµÄ IP µØÖ·¡£
´ËÏîÐÅÏ¢Óû§²»¿ÉÒÔÐ޸ġ£
Èç¹ûÕæµÄ ......
ÔÚÒ³ÃæÖмÓÈëÒ»¸öͼƬ¿Ø¼þ£¬²¢½«ËüµÄStyleÊôÐÔÉèΪ£ºFILTER: chroma(color:#000000) £¬ÔÒòÊÇ×Ô¶¯Éú³ÉµÄGIFͼƬ×ÜÊǺÚÉ«±³¾°¡£È»ºóÔÚºǫ́´úÂëÖÐдÈëÈçÏ´úÂë¡£(¼ûDEMO)
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using Sy ......
ASP.NET,AJAXÎļþÉÏ´«µÄÒÉÎÊ
Ô±¾ÒÔΪÓÃÕâÖÖ·½Ê½£¬°Ñ´Ë·½·¨·Åµ½Ò»¸öHttphandlerÖУ¬È»ºó´ÓJAVASCRIPT·ÃÎÊHttphandlerÀ´ÊµÏÖÎÞˢеÄÎļþÉÏ´«¡£Ã»Ïëµ½£¬ÕâÑùͬÑùÊDz»Ðеģ¬Ö»ÄÜÔÚ±¾»ú²âÊÔͨ¹ý£¬Èç¹û·Åµ½ÍøÉÏ£¬»òÕß´ÓÆäËûµØ·½·ÃÎʾͻáÌáʾÎÞ·¨ÕÒµ½Îļþ£¬¿É¼ûÔÚASP.NETÖÐËüÖ»ÄÜÓÃÓÚÉÏ´«·þÎñÆ÷¶ËµÄÎļþ¡£
֮ǰÔÚÍøÕ¾Ò²Ë ......
1¡¢aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TransferMoney.aspx.cs" Inherits="BtmsWebApp.report.TransferMoney" MasterPageFile="~/ReportPage.master" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d5 ......
+++ ¹æ¶¨»º´æÏîµÄ¼üÖµ¾Í¿ÉÒÔ´Ó»º´æÖмìË÷»º´æÏîµÄÊý¾Ý¡£È»¶ø£¬ÒòΪ±£´æÔÚ»º´æÖеÄÊý¾ÝÊDz»Îȶ¨µÄ£¬¿ÉÄܻᱻASP.NETÒƳý£¬ËùÒÔ£¬ÍƼöµÄ¿ª·¢·½Ê½ÎªÓ¦¸ÃÏÈÈ·¶¨»º´æÏîÊÇ·ñ´æÔÚ£¬Èç¹û²»´æÔÚ£¬Ó¦¸ÃÏÈÌí¼Ó¸Ã»º´æÏîµ½»º´æ£¬È»ºóÔÙ¼ìË÷¸Ã»º´æÏî¡£
+++ ¼ìË÷»º´æÏî
ÏÂÃæµÄÀý×ÓÑÝʾ£¬È·¶¨ÃûΪ“CacheItem”µÄ»º´æÏîÊÇ·ñ´æÔÚ ......