Tuesday, December 27, 2011
SQL to ORDER BY datetime Field by date
SELECT
distinct Convert(varchar(10),Tasks.DateCreated,101) As Date,
Count(Convert(varchar(10),Tasks.DateCreated,101)) As DateCount
FROM Tasks
GROUP BY Convert(varchar(10),Tasks.DateCreated,101)
Wednesday, June 22, 2011
Output a DataTable in Random Order - VB.NET
Dim myDataTable As DataTable
myDataTable = Whatever your data table is
myDataTable.Columns.Add(New DataColumn("RandNum", GetType(Integer)))
Dim i as Integer
Dim rndNum as New Random()
For i = 0 to myDataTable.Rows.Count - 1
myDataTable.Rows(i)("RandNum") = rndNum.Next(10000)
Next i
Dim myDataView as DataView = myDataTable.DefaultView
myDataView.Sort = "RandNum"
myDataTable = myDataView.ToTable()
Monday, March 14, 2011
Microsoft Expression Locks Up When Saving Page
Fix:
In Expression, Click --> Tools --> Application Options --> Configure Editors.
For each file extension, click New Editor --> Open as XML. Move the XML editor to the top so it says (default).
Hope this helps
Monday, January 17, 2011
Outputting Tableless HTML Navigation with ASP>NET
The solution is to use an asp:repeater. Here is a really well written article describing what I agree is the best method for outputting site navigation in an ordered list format.
- Output your data to an xml sitemap
- Display the sitemap on the page as an unordered list using a Repeater .
Sunday, August 22, 2010
New Stylesheet for PORDL
So, I spent the whole day Sunday making a new Generic XSL stylesheet for PORDL. I built javascript into the XSL that ticks through the nodes showing only one at a time. I was pleasantly surprised that they worked great out of the box for Picasa and FlickR gallery feeds.
PORDL makes it easy to embed the gallery with just one line of code:
<script type='text/javascript' src='http://pordl.com/js.aspx?id=289' ></script>
Friday, August 13, 2010
What's the Deal Windows?
Wednesday, July 21, 2010
Pass Querystring Parameter to ASP.NET Control
Although this is grade school stuff, when you can't get something working, you need to consult Google for the answer. But, I couldn't find the answer on Google. So, I will be the first, I guess:
I was doing some cross-browser scripting, trying to get the output of a ASP.NET contol to appear on a PHP page on another site. But, your reasons will probably be different. In any manner, if you need to pass variables through the querystring to an ASP.NET page, this info may help:
<asp:myControlName myPropertyName="'<%# Request.QueryString("myURLvariableName")%>' ></asp:mycontrolname>