string sql = "Insert into user(name,pass) values ('" + this.name.Text + "','" + this.pass.Text + "')";
用上面这种方法可以把textbox类型的数据写入数据库,那么像ListItem、dropdownlist、TEXTAREA等类型的数据怎么写进数据库呢?还有就是当前时间、用户IP应该怎么写呢?
在asp中用now()、和Request.ServerVariables("REMOTE_ADDR")
那么在asp.net中怎么写呢?