04 2013 档案

摘要:点击按钮,执行提交操作,弹出消息框后,页面的样式变乱,解决方法:首先,确定使用的css样式正确,页面中的宽高值保持规范统一;然后,弹出框避免使用Response.Write()可以修改为:ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('XXXX');</script>");因为使用Response.Write()它是在页面顶部输出,会扰乱整个网站布局。 阅读全文
posted @ 2013-04-18 19:06 wxjya 阅读(122) 评论(0) 推荐(0)
摘要:使用usingusing (SqlConnection conn=New SqlConnection("连接数据库语句"){ conn.Open(); using (SqlCommand cmd=conn.CreatCommand()) { cmd.CommandText="select 语句"; using(SqlDataReader reader=cmd.ExecuteReader()); { while(reader.Read()) { ......... } } }}: 阅读全文
posted @ 2013-04-18 18:40 wxjya 阅读(112) 评论(0) 推荐(0)