נשלח בתאריך: 11 April 2009 בשעה 03:32 | | IP רשוּם
|
|
|
|
asp זה היה response.write rs("kind")
איך עושים את זה ב ASP.NET?
הקוד:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
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.OleDb;
using System.Data.SqlClient;
publicpartialclassSha : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{
string ConStr = ConfigurationSettings.AppSettings["mn"];
OleDbConnection ConObj = newOleDbConnection(ConStr);
string SqlStr = "SELECT * FROM [apartments]";
OleDbCommand cmd = newOleDbCommand(SqlStr, ConObj);
ConObj.Open();
OleDbDataReader Reader = cmd.ExecuteReader();
while (Reader.Read())
{
}
Reader.Close();
ConObj.Close();
}
}
תודה גל
|