Tuesday 22 May 2012

MS Access - How to get week number from the date field

Watch this example on YouTube:
Week Number : DatePart("ww",DateField)

Monday 14 May 2012

HTML - GET vs POST and how to retrive values on another page

// GET will append data to actual address
// GET with more then one QueryStrings (separated by &)
http://www.mywebsite.com/Reviews/ViewDetails.aspx?ReviewId=34&CategoryId=3
int reviewId = Convert.ToInt32(Request.QueryString.Get("ReviewId"));
int categoryId = Convert.ToInt32(Request.QueryString.Get("CategoryId"));


// POST data is sent in body of the request

// on another page use
HttpContext.Current.Request.QueryString["BrandId"];
// to get data.

CSS - Element vs Tag vs Attribute

Element:
<p> this is some text </p>
Tag:
<p>
Attribute:
<p class="formatting"

C# Decimal vs Double

Decimal - slower, more precise.  Use in currency