Click here to Skip to main content
16,016,227 members
Home / Discussions / C#
   

C#

 
QuestionMake a DataGrid's row pointer to invisible [modifed] Pin
Inquire2you19-May-06 19:57
Inquire2you19-May-06 19:57 
QuestionAdding dynamic radiobutton to a gridview Pin
Ritaa19-May-06 19:35
Ritaa19-May-06 19:35 
AnswerRe: Adding dynamic radiobutton to a gridview Pin
coolestCoder19-May-06 21:22
coolestCoder19-May-06 21:22 
GeneralRe: Adding dynamic radiobutton to a gridview [modified] Pin
Ritaa21-May-06 0:30
Ritaa21-May-06 0:30 
QuestionPassing an array to a class Pin
teejayem19-May-06 13:40
teejayem19-May-06 13:40 
AnswerRe: Passing an array to a class Pin
Al Ortega19-May-06 14:33
Al Ortega19-May-06 14:33 
QuestionLast Modified date of an External webpage Pin
Patricker19-May-06 13:10
Patricker19-May-06 13:10 
AnswerRe: Last Modified date of an External webpage Pin
Rei Miyasaka19-May-06 14:23
Rei Miyasaka19-May-06 14:23 
You can call Response.GetResponseHeader("Last-Modified") to get the time, but then you have to parse it -- and there's about 3 standard time formats in HTTP. Luckily I wrote a parser for a web server[^] a while ago, so here it is:
static DateTime ParseHttpTime(string str)
{
   DateTime dt;
   try
   {
      dt = DateTime.ParseExact(str, httpDateTimeFormats, System.Globalization.DateTimeFormatInfo.InvariantInfo,
         System.Globalization.DateTimeStyles.AllowWhiteSpaces | System.Globalization.DateTimeStyles.AdjustToUniversal);
   }
   catch(FormatException)
   {
      dt = DateTime.Parse(str, CultureInfo.InvariantCulture);
   }
   return dt;
}


The method can throw an ArgumentNullException if the input is null and a FormatException if the input isn't formatted properly.

Keep in mind this happens a lot... most servers don't seem to return a Last-Modified value these days.
GeneralRe: Last Modified date of an External webpage Pin
Patricker19-May-06 20:55
Patricker19-May-06 20:55 
GeneralRe: Last Modified date of an External webpage Pin
Rei Miyasaka19-May-06 22:53
Rei Miyasaka19-May-06 22:53 
QuestionWhy does .csproj change Component to UserControl Pin
Curtis Harrison19-May-06 11:48
Curtis Harrison19-May-06 11:48 
AnswerRe: Why does .csproj change Component to UserControl Pin
Rei Miyasaka19-May-06 14:25
Rei Miyasaka19-May-06 14:25 
QuestionEmbedding and XML inside of a binary file... Pin
kevin-rf19-May-06 11:07
kevin-rf19-May-06 11:07 
AnswerRe: Embedding and XML inside of a binary file... Pin
leppie19-May-06 13:04
leppie19-May-06 13:04 
GeneralRe: Embedding and XML inside of a binary file... Pin
kevin-rf19-May-06 13:53
kevin-rf19-May-06 13:53 
GeneralRe: Embedding and XML inside of a binary file... Pin
leppie19-May-06 14:11
leppie19-May-06 14:11 
GeneralRe: Embedding and XML inside of a binary file... Pin
Rei Miyasaka19-May-06 14:31
Rei Miyasaka19-May-06 14:31 
GeneralRe: Embedding and XML inside of a binary file... Pin
kevin-rf19-May-06 15:05
kevin-rf19-May-06 15:05 
GeneralRe: Embedding and XML inside of a binary file... [modifed] Pin
Rei Miyasaka19-May-06 15:30
Rei Miyasaka19-May-06 15:30 
QuestionSaving a reference to an assembly Pin
gantww19-May-06 10:59
gantww19-May-06 10:59 
AnswerRe: Saving a reference to an assembly Pin
Rei Miyasaka19-May-06 14:39
Rei Miyasaka19-May-06 14:39 
Questionnoob array question [modifed] Pin
likefood19-May-06 10:45
likefood19-May-06 10:45 
AnswerRe: noob array question Pin
Josh Smith19-May-06 10:49
Josh Smith19-May-06 10:49 
GeneralRe: noob array question Pin
likefood19-May-06 10:50
likefood19-May-06 10:50 
QuestionChecking to see if object is char or int Pin
jrcook19-May-06 9:40
jrcook19-May-06 9:40 

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.