Session["Title"] = this.txtTitle.Text; Session["Blog"] = this.txtBlog.Text; Session["Name"] = this.txtName.Text; Session["Changed"] = true; Session["Image"] = this.Image1.ImageUrl; // and redirect to another page-BlogList.aspx // here,will maintain //Database table from scratch DataTable theTable = new DataTable("Comments"); ds.Tables.Add(theTable); // add a name, time, title, and blog columns to our mock-up blog database theTable.Columns.Add("Name", Type.GetType("System.String")); theTable.Columns.Add("Time", Type.GetType("System.DateTime")); theTable.Columns.Add("Title", Type.GetType("System.String")); theTable.Columns.Add("Blog", Type.GetType("System.String")); theTable.Columns.Add("Image", Type.GetType("System.String")); //and then write on xml file-comment.xml like // create a new DataRow DataRow dr = ds.Tables["Comments"].NewRow(); // Populate the row from the text boxes filled by the user dr[0] = Session["Name"]; dr[1] = System.DateTime.Now; dr[2] = Session["Title"]; dr[3] = Session["Blog"]; dr[4] = Session["Image"]; //And display on table by // add title (use a single column)// TableRow tr = new TableRow(); tr.Cells.Add(new TableCell()); // change title color slightly tr.Cells[0].ForeColor = Color.Navy; tr.Cells[0].Width = 400; // make the text title big and purple tr.Cells[0].Text = "<font size="5" color="purple" face="Rockwell">" + dr[2].ToString() + "</font>"; this.BlogTable.Rows.Add(tr);
tr.Cell[o].text->
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)