1.配置web.config文件
<ConnectionStrings>
<add name="Connection" ConnectionString="Data Source=数据库名;User ID=;Password=;Unicode=true" ProviderName="System.Data.OracleClient">
</ConnectionStrings>
2.防止SQL注入
OracleConnectin con = new OracleConnectin(url);
con.Open();
string sql = "select * from 表名 where ID:=myID and Password:=myPwd";
OracleCommand cmd = new OracleCommand(sql,con);
OracleParameter op1 = new OracleParameter("myID",OracleType.Varchar,256);
OracleParameter op2 = new OracleParameter("myPwd",OracleType.Varchar,256);
op1.value = txtID.Text;
op2.value = txtPwd.Text;
cmd.Parameter.Add(op1);
cmd.Parameter.Add(op2);
OracleDataReader odr = cmd.executeReader();
3.加入css,js和写javascript方法
css: <link rel="stylesheet" type="text/css" href="/CommCss/myCss.css"/>
js: <script language="javascript" type="text/javascript" src="/ComJs/myJs.js"></script>
javascript函数:
<script language="javascript" type="text/javascript">
function 函数名()
{
}
</script>