Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to make a application in which a data can be pass from BlogEntry.aspx in the form of session variable like
C#
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);

but Can'nt display a image by
tr.Cell[o].text->what is suitable for that please help me plzzz help me
Posted
Updated 5-May-13 10:19am
v7
Comments
Sergey Alexandrovich Kryukov 5-May-13 14:51pm    
ASP.NET? Tag it. If UI is concerned, you should always tag the UI library or the application type.
—SA

1 solution

This seems to be rather trivial, at least from a Google[^] search.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900