Jump to content
Xtreme .Net Talk

Zion

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Zion

  1. they don't have books about asp.net in the library's over here, but i'll go and see in the computer store if I can buy a usefull book. But till then, can anyone tell me how i can solve my problem?
  2. I'm indead a newbie, where can i study the database part of asp.net? I learned how to get data from a database in school, but we'll learn how to write data to a database in february, and i want to know how to do it now :) But i'll look, but when I don't find it, i'll be back in here to ask again.
  3. code language used: c# in asp.net
  4. it's just text that is stored in my arraylist, so i guess it should work :)
  5. using: c# and asp.net please help me, i've been searching for this for over 3 days now.
  6. I first make an ArrayList, I connect to the database and put the data from the database in the ArrayList. Then i put the data from the ArrayList into a DataGrid. The problem is that I add some memo-fields to my ArrayList, and when the memo field is placed in my DataGrid, all my hard enters are gonna, so all the text is sticked together. Does anyone have a solution for this problem? Language use C# in asp.net. Code: using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Data.OleDb; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; namespace Crittlists { /// <summary> /// Summary description for HaatStrijd2. /// </summary> public class HaatStrijd2 : System.Web.UI.Page { protected System.Web.UI.WebControls.DataGrid DataGrid1; protected System.Web.UI.WebControls.DataGrid dgridCrittlist; private void Page_Load(object sender, System.EventArgs e) { ArrayList crittlist=new ArrayList(); string mage= Request.QueryString["Magename"]; OleDbConnection DB = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:/Inetpub/wwwroot/Crittlists/mages.mdb"); DB.Open(); OleDbCommand rsCrittlist = new OleDbCommand("select crittlist from mage where magename='"+mage+"';", DB); OleDbDataReader rdCrittlist = rsCrittlist.ExecuteReader(); while (rdCrittlist.Read()) { crittlist.Add(rdCrittlist.GetString(0)); } rdCrittlist.Close(); DB.Close(); dgridCrittlist.DataSource=crittlist; dgridCrittlist.DataBind(); dgridCrittlist.AllowSorting.ToString(); // Put user code to initialize the page here } #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); } /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.Load += new System.EventHandler(this.Page_Load); } #endregion } }
×
×
  • Create New...