using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Data.OleDb; using System.Configuration; using System.IO; namespace glorija { /// /// Summary description for WebForm1. /// public class GuestbookLoad : System.Web.UI.Page { private void Page_Load(object sender, System.EventArgs e) { loadGuestbook(); } // // private void loadGuestbook() { //Deklaracija varijabli OleDbConnection OleDbConn = null; OleDbCommand dbComm = null; OleDbDataReader dbReader = null; // string sqlQuery = null; string gBookID = null; string date = null; string comment = null; string name = null; string email = null; string web = null; // OleDbConn = new OleDbConnection(ConfigurationSettings.AppSettings["dbGlorija"]); // sqlQuery = "SELECT * FROM GL_LoadGuestbook"; // dbComm = new OleDbCommand(sqlQuery,OleDbConn); // OleDbConn.Open(); // dbReader = dbComm.ExecuteReader(); // while (dbReader.Read()) { gBookID += dbReader["GBookID"] + "*"; date += dbReader["Datum"] + "*"; comment += dbReader["Comment"] + "*"; name += dbReader["Name"] + "*"; email += dbReader["Email"] + "*"; web += dbReader["Web"] + "*"; } // dbReader.Close(); // OleDbConn.Close(); // Response.Write("gBookID=" + gBookID + "end"); Response.Write("&date=" + date + "end"); Response.Write("&comment=" + comment + "end"); Response.Write("&name=" + name + "end"); Response.Write("&email=" + email + "end"); Response.Write("&web=" + web + "end"); Response.Write("&kraj=true"); // } #region Web Form Designer generated code override protected void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); base.OnInit(e); } /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.Load += new System.EventHandler(this.Page_Load); } #endregion } }