Profile
Achievement
jink's Recent Snippets
- All /
« Prev 1 Next »
I use this action code with http://valums.com/ajax-upload/ to handle the upload from any browser.
0
920
posted 14 years ago by jink
ASP
MySQL: Preventing "Unable to convert MySQL date/time value to System.DateTime" (Invalid Date Data).
Changing the connection string in the web.config to allow zero date and converting it prevents this error.
0
992
posted 14 years ago by jink
Add the System.Data config settings for MySql. Update the version to number referenced.
0
751
posted 14 years ago by jink
Etag Removal: http://developer.yahoo.com/performance/rules.html#etags
Font Compression: http://www.phpied.com/gzip-your-font-face-files/
Compression: http://developer.yahoo.com/performance/rules.html#gzip
2
1069
posted 14 years ago by jink
Use this rewrite rule to enable permalinks on a host. Used when Wordpress doesn't write the conditions correctly (like on a host I am testing with).
0
828
posted 14 years ago by jink
JavaScript
ASP.net & MS AJAX: Enabling WebKit support (chrome, safari) in MS AJAX (fixing webkit browser detection)
Load this Javascript after the MS AJAX files have been loaded. In the example I am using jQuery to call the patchMicrosoftAjax() method, but you can use any method you desire.
0
1419
posted 15 years ago by jink
Page_ClientValidate is a global function. When called this will return true/false if the validator group provided is valid or not.
0
809
posted 15 years ago by jink
Bind the DropDownList like normal (set DataSourceID, DataTextField, DataValueField), and <%BIND%> the SelectedValue field. AutoPostBack should be enabled. In the OnSelectedIndexChanged:
0
983
posted 15 years ago by jink
Use this code to pull a DotNetNuke URL from a tab name. We use this to replace "?tabname=blah" type URLs which do NOT transfer language info.
0
1009
posted 15 years ago by jink
Call with the path of any javascript you want to load into the HEAD of the ASPX page.
1
1306
posted 15 years ago by jink
Returns the postback sender ID. This is usually a button ID from a form that caused a post back.
0
902
posted 15 years ago by jink
Call AddKeepAlive() in Page_Load of the page that needs it. Change the path to the correct keep alive page.
Page should disable caching, like in second code snippet.
2
991
posted 15 years ago by jink
Replace *SERVERNAME* with the name of the server name in the web.config
2
864
posted 15 years ago by jink
Code snippet prevents caching of the page by setting http header values and a LAST MODIFIED header to prevent google from caching too long. This should go into the page load event.
1
836
posted 15 years ago by jink