上海梵科信息科技有限公司
1. a=5, b=(++a)+(a++)+(a++), printf("%d",b);
答案:19
?
2. 表students,有id, classid, name, score。
- 班級為4的所有學生?
答案:select * from students where classid=4
- 每個班級的學生總數?
答案:select classid, count(*) as total?from students group by classid
- 每個班級的最高分記錄?
答案:select classid, max(score) as maxNumber from students group by classid
?
3. 使用數據庫連接字符串是:Data Source=localhost; Initial Catalog=school; User ID=admin;?Password=admin顯示students表中所有的數據;
答案:
?
Codeusing?System.Data.SqlClient;
namespace?WebApplication1
{
????public?partial?class?DataReader?:?System.Web.UI.Page
????{
????????protected?void?Page_Load(object?sender,?EventArgs?e)
????????{
????????????string?strConnection?=?"Data?Source=localhost;?Initial?Catalog=InterviewExam;?User?Id=sa;?Password=tingate587";
????????????string?strSQL?=?"select?*?from?student";
????????????SqlConnection?objConnection?=?new?SqlConnection(strConnection);
????????????SqlCommand?objCommand?=?new?SqlCommand(strSQL,?objConnection);
????????????objConnection.Open();
????????????SqlDataReader?objReader?=?objCommand.ExecuteReader();
????????????while(objReader.Read())
????????????{
????????????????Response.Write(objReader["Name"].ToString());
????????????}
????????????objConnection.Close();
????????}
????}
}
?
4. aspx頁面如何調用.cs文件中的變量?
答案:<% =變量名 %>
?
5. 編寫一段javascript代碼實現檢查name輸入框不能為空,age輸入框只能填寫數字;
答案:
?
6. 簡述對CSS與DIV的了解。
答案:
?
7. 有一個DATATABLE,如何不用服務器控件來實現顯示。
答案:
轉載于:https://www.cnblogs.com/Fernando/archive/2008/08/31/1280751.html
總結
以上是生活随笔為你收集整理的上海梵科信息科技有限公司的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 试管婴儿是夫妻双方的吗?
- 下一篇: WCF Testing Tool(转)