Click here to Skip to main content
15,908,013 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralInsert images in to MySql database Pin
yadlaprasad10-Jan-08 9:13
yadlaprasad10-Jan-08 9:13 
GeneralRe: Insert images in to MySql database Pin
Pete O'Hanlon10-Jan-08 11:01
mvePete O'Hanlon10-Jan-08 11:01 
GeneralSomething broke (DataBind Gone Wild) Pin
Todd Smith10-Jan-08 8:18
Todd Smith10-Jan-08 8:18 
GeneralRe: Fixed Pin
Todd Smith10-Jan-08 9:33
Todd Smith10-Jan-08 9:33 
QuestionEnterprise library throws exception once a day: Invalid operation. The connection is closed Pin
HappyASPNETCoding10-Jan-08 7:46
HappyASPNETCoding10-Jan-08 7:46 
GeneralRe: Enterprise library throws exception once a day: Invalid operation. The connection is closed Pin
Pete O'Hanlon10-Jan-08 10:32
mvePete O'Hanlon10-Jan-08 10:32 
GeneralRe: Enterprise library throws exception once a day: Invalid operation. The connection is closed Pin
HappyASPNETCoding11-Jan-08 9:35
HappyASPNETCoding11-Jan-08 9:35 
GeneralMy ASP.NET DataGrid is not showing up in web page [modified] Pin
dyerstein10-Jan-08 7:02
dyerstein10-Jan-08 7:02 
I have created a simpe web control for geting rss news from bbc. this method I have is:
private DataTable GetRssDataFeed()
{
DataTable RssTable = new DataTable("RssTable");
DataColumn dtCol;
DataRow dtRow;

// Create Title column and add to the DataTable.
dtCol = new DataColumn();
dtCol.DataType = System.Type.GetType("System.String");
dtCol.ColumnName = "Title";
dtCol.Caption = "Title";

// Add the column to the DataColumnCollection.
RssTable.Columns.Add(dtCol);

// Create Description and add to the DataTable.
dtCol = new DataColumn();
dtCol.DataType = System.Type.GetType("System.String");
dtCol.ColumnName = "Description";
dtCol.Caption = "Description";

// Add the column to the DataColumnCollection.
RssTable.Columns.Add(dtCol);

// Create Link and add to the DataTable.
dtCol = new DataColumn();
dtCol.DataType = System.Type.GetType("System.String");
dtCol.ColumnName = "Link";
dtCol.Caption = "Link";

// Add the column to the DataColumnCollection.
RssTable.Columns.Add(dtCol);

// Create Title Description and add to the DataTable.
dtCol = new DataColumn();
dtCol.DataType = System.Type.GetType("System.String");
dtCol.ColumnName = "Publication Date /Time";
dtCol.Caption = "Publication Date / Time";

// Add the column to the DataColumnCollection.
RssTable.Columns.Add(dtCol);

// Create a new XmlTextReader from the specified URL (RSS feed)
rssReader = new XmlTextReader(rssUrl);
rssDoc = new XmlDocument();
// Load the XML content into a XmlDocument
rssDoc.Load(rssReader);

// Loop for the <rss> tag
for (int i = 0; i < rssDoc.ChildNodes.Count; i++)
{
// If it is the rss tag
if (rssDoc.ChildNodes[i].Name == "rss")
{
// <rss> tag found
nodeRss = rssDoc.ChildNodes[i];
}
}

// Loop for the <channel> tag
for (int i = 0; i < nodeRss.ChildNodes.Count; i++)
{
// If it is the channel tag
if (nodeRss.ChildNodes[i].Name == "channel")
{
// <channel> tag found
nodeChannel = nodeRss.ChildNodes[i];
}
}

// Loop for the <title>, <link>, <description> and all the other tags
for (int i = 0; i < nodeChannel.ChildNodes.Count; i++)
{
// If it is the item tag, then it has children tags which we will add as items to the DataGrid1
if (nodeChannel.ChildNodes[i].Name == "item")
{
nodeItem = nodeChannel.ChildNodes[i];

// Create a new row in the datagrid containing information from inside the nodes
dtRow = RssTable.NewRow();
dtRow["Title"] = nodeItem["title"].InnerText;
dtRow["Description"] = nodeItem["description"].InnerText;
dtRow["Link"] = nodeItem["link"].InnerText;
dtRow["Publication Date /Time"] = nodeItem["pubDate"].InnerText;
RssTable.Rows.Add(dtRow);

}
}
return RssTable;
}

...
in my on PageLoad:

protected void Page_Load(object sender, EventArgs e)
{
//this.txtResults.Text = GetRssDataFeed();
DataTable A = GetRssDataFeed();
this.DataGrid1.DataSource = A;
this.DataGrid1.DataBind();
}

When I run this, I see nothing, now datagrid control, no data, and I just cant seem to work out why this does not work. If I use the debugger, I can see that it does get the data!!!! Just a little confused here! </description></link>

My bad! It seems i did not set the width property correctly! Sleepy | :zzz:

modified on Thursday, January 10, 2008 3:56:43 PM

QuestionUsing Outlook tasks and calendar in my ASP net web application Pin
Member 475670910-Jan-08 5:46
Member 475670910-Jan-08 5:46 
Generalcss styles Pin
solarthur0110-Jan-08 4:32
solarthur0110-Jan-08 4:32 
Generalgridview problem Pin
solarthur0110-Jan-08 3:02
solarthur0110-Jan-08 3:02 
GeneralRe: gridview problem Pin
Declan Bright10-Jan-08 3:06
Declan Bright10-Jan-08 3:06 
GeneralRe: gridview problem Pin
solarthur0110-Jan-08 3:19
solarthur0110-Jan-08 3:19 
GeneralCreate Image from html string Pin
Imran Khan Pathan10-Jan-08 1:29
Imran Khan Pathan10-Jan-08 1:29 
GeneralRe: Create Image from html string Pin
N a v a n e e t h10-Jan-08 1:35
N a v a n e e t h10-Jan-08 1:35 
GeneralRe: Create Image from html string Pin
Imran Khan Pathan10-Jan-08 1:56
Imran Khan Pathan10-Jan-08 1:56 
GeneralRe: Create Image from html string Pin
N a v a n e e t h10-Jan-08 2:06
N a v a n e e t h10-Jan-08 2:06 
GeneralRe: Create Image from html string Pin
Imran Khan Pathan10-Jan-08 2:18
Imran Khan Pathan10-Jan-08 2:18 
GeneralDisplay Msgbox Pin
Rinki Mukheraji10-Jan-08 0:47
Rinki Mukheraji10-Jan-08 0:47 
GeneralRe: Display Msgbox Pin
Declan Bright10-Jan-08 1:13
Declan Bright10-Jan-08 1:13 
GeneralRe: Display Msgbox Pin
Rinki Mukheraji10-Jan-08 1:23
Rinki Mukheraji10-Jan-08 1:23 
GeneralRe: Display Msgbox Pin
Declan Bright10-Jan-08 2:53
Declan Bright10-Jan-08 2:53 
Questionhow many characters does an hidden field holds Pin
jagan1239-Jan-08 23:50
jagan1239-Jan-08 23:50 
AnswerRe: how many characters does an hidden field holds Pin
N a v a n e e t h9-Jan-08 23:54
N a v a n e e t h9-Jan-08 23:54 
GeneralText file and view state data Pin
Sujit Mandal9-Jan-08 23:46
Sujit Mandal9-Jan-08 23:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.