Click here to Skip to main content
15,887,175 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionasp.net vb radiobuttonlist object reference Pin
janetb9931-Dec-09 4:31
janetb9931-Dec-09 4:31 
AnswerRe: asp.net vb radiobuttonlist object reference Pin
janetb994-Jan-10 10:33
janetb994-Jan-10 10:33 
QuestionNeed some expert advices on ViewState Pin
James Shao31-Dec-09 4:26
James Shao31-Dec-09 4:26 
AnswerRe: Need some expert advices on ViewState Pin
James Shao31-Dec-09 20:19
James Shao31-Dec-09 20:19 
AnswerRe: Need some expert advices on ViewState Pin
Anurag Gandhi31-Dec-09 20:57
professionalAnurag Gandhi31-Dec-09 20:57 
GeneralRe: Need some expert advices on ViewState Pin
James Shao1-Jan-10 4:26
James Shao1-Jan-10 4:26 
GeneralRe: Need some expert advices on ViewState Pin
Anurag Gandhi1-Jan-10 6:25
professionalAnurag Gandhi1-Jan-10 6:25 
Questionproblem with RSS feed - pubDate Pin
CrimeanTurtle200831-Dec-09 0:17
CrimeanTurtle200831-Dec-09 0:17 
Hi All,

Hope everyone had a Merry Xmas and Happy New Year.

Just a question...I have made an RSS Feed which is syndicated by the Mozilla and IE , as an output of an XML file. However when either of the feeds show, they show the pubDate as being totally different dates to what is shown in the XML file. Even when I look at the source, the XML file still shows the correct dates as opposed to what is shown in the browser.
What do you guys think is the problem? Heres my code. Cheers.


public static void CreateNewsFeed(string mappath)
{
FileStream fs = null;
StreamWriter sw = null;

try
{


using (SqlConnection conn = Connection.connect())
{


SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = "ShowNewsFeed";
cmd.CommandType = CommandType.StoredProcedure;
SqlDataReader reader = cmd.ExecuteReader();

fs = new FileStream(mappath, System.IO.FileMode.Create, System.IO.FileAccess.Write);
sw = new StreamWriter(fs);

sw.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
//ISO-8859-1
//xmlns:atom=\"http://www.w3.org/2005/Atom\"

sw.WriteLine("<rss version=\"2.0\">");
sw.WriteLine("<channel>");
sw.WriteLine("<title>Company Name</title>");
sw.WriteLine("<link>http://www.companyname.com.au/Home/News/News.aspx</link>");
sw.WriteLine("<description>News and the latest updates</description>");
sw.WriteLine("<language>en-us</language>");


while (reader.Read())
{
DateTime dt = (DateTime)reader["datePosted"];

sw.WriteLine("<item>");
sw.WriteLine("<title>" + reader["title"].ToString() + "</title>");
sw.WriteLine("<link>http://www.companyname.com.au/NewsArticle.aspx?newsID=" + reader["newsID"] + "</link>");
sw.WriteLine("<description>" + reader["description"].ToString() + "</description>");
sw.WriteLine("<pubDate>" + dt.ToString("R") + "</pubDate>");
sw.WriteLine("</item>");

}

sw.WriteLine("</channel>");
sw.WriteLine("</rss>");
sw.Close();
fs.Close();

}
}
catch (Exception m)
{

throw new Exception(m.Message);
}

}
Questiona Problem Reporting with Word Document Pin
alaminfad30-Dec-09 23:28
alaminfad30-Dec-09 23:28 
AnswerRe: a Problem Reporting with Word Document Pin
Estys31-Dec-09 2:05
Estys31-Dec-09 2:05 
Questionahmad abdulkader Pin
ahmad000930-Dec-09 22:41
ahmad000930-Dec-09 22:41 
QuestionDate Slider Pin
Subin Mavunkal30-Dec-09 22:26
Subin Mavunkal30-Dec-09 22:26 
GeneralRe: Date Slider Pin
J a a n s31-Dec-09 1:30
professionalJ a a n s31-Dec-09 1:30 
QuestionUpdating a rpeater Pin
benams30-Dec-09 22:15
benams30-Dec-09 22:15 
AnswerRe: Updating a rpeater Pin
Abhijit Jana30-Dec-09 22:16
professionalAbhijit Jana30-Dec-09 22:16 
QuestionValidate name in text box Pin
MathewPV30-Dec-09 17:57
MathewPV30-Dec-09 17:57 
AnswerRe: Validate name in text box Pin
nagendrathecoder30-Dec-09 18:02
nagendrathecoder30-Dec-09 18:02 
GeneralRe: Validate name in text box Pin
MathewPV30-Dec-09 18:32
MathewPV30-Dec-09 18:32 
AnswerRe: Validate name in text box Pin
dan!sh 30-Dec-09 18:13
professional dan!sh 30-Dec-09 18:13 
Questionsteps for how to pass parameters to crystal report using text box or dropdownlist using asp.net with c# Pin
developerit30-Dec-09 17:14
developerit30-Dec-09 17:14 
AnswerRe: steps for how to pass parameters to crystal report using text box or dropdownlist using asp.net with c# Pin
nagendrathecoder30-Dec-09 17:41
nagendrathecoder30-Dec-09 17:41 
GeneralRe: steps for how to pass parameters to crystal report using text box or dropdownlist using asp.net with c# Pin
developerit30-Dec-09 20:50
developerit30-Dec-09 20:50 
Questionwhere are SQL server database files located? Pin
Seraph_summer30-Dec-09 9:10
Seraph_summer30-Dec-09 9:10 
AnswerRe: where are SQL server database files located? Pin
Ian McCaul30-Dec-09 9:33
Ian McCaul30-Dec-09 9:33 
AnswerRe: where are SQL server database files located? Pin
Christopher Duncan30-Dec-09 17:11
Christopher Duncan30-Dec-09 17:11 

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.