Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

javascript - How to get file creation date on server for jQuery/uploadify? -


i using jquery uploadify plugin on web page transfer files local computer asp.net mvc2 control action method. there way transfer creation date/time of file server?

i can @ data in uploadify event on client, can not figure out how "package" data moved server w/ file.

any thoughts appreciated.

try using onselect event add values scriptdata object.

update: following ad-hoc view pass data action. appears modificationdate returns unix timestamp in it's time field , you'll have convert on server side. wasn't able find documentation on modificationdate property.

<%@ page language="c#" inherits="system.web.mvc.viewpage<dynamic>" %>  <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title>home</title><link href="/scripts/uploadify.css" type="text/css" rel="stylesheet" />     <script type="text/javascript" src="/scripts/jquery-1.4.2.min.js"></script>     <script type="text/javascript" src="/scripts/swfobject.js"></script>     <script type="text/javascript" src="/scripts/jquery.uploadify.v2.1.4.min.js"></script>     <script type="text/javascript">         var myscriptdata = {};         $(document).ready(function () {             $('#file_upload').uploadify({                 'uploader': '/scripts/uploadify.swf',                 'script': '/test/upload',                 'cancelimg': '/scripts/cancel.png',                 'folder': '/app_data',                 'auto': true,                 'onselect': function (event, id, fileobj) {                     $('#file_upload').uploadifysettings('scriptdata', {                         modifiedtimestamp: fileobj.modificationdate.time                     });                     return true;                 }             });             $('#file_upload').uploadifysettings('scriptdata', myscriptdata);         });     </script> </head> <body>     <input id="file_upload" name="file_upload" type="file" /> </body> </html> 

in action method, can grab timestamp through request.form["modifiedtimestamp"]. check here on how convert timestamp datetime object.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -