/// Gets the week number.
/// <param name="dtDate">The date for which week number is required.</param>
public static int GetWeekNumber(DateTime dtDate)
CultureInfo culture = CultureInfo.CurrentCulture;
int weekNumber= culture.Calendar.GetWeekOfYear(dtDate, CalendarWeekRule.FirstFullWeek, DayOfWeek.Monday);
After this function I placed a server side Image control on my aspx page like this:-
<asp:Image ID="imgForWeek" runat="server" />
And here is how I called my function to display image for week in my code behind file:-
protected void Page_Load(object sender, EventArgs e)
imgForWeek.ImageUrl = "../Images/image" + GetWeekNumber(DateTime.Now)+".jpg";
Hopefully this will be useful for you as well. Happy Coding !!!