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.

actionscript 3 - restoring scroll position in Flex Web Page -


this crucial overlooked functionality guess in web page - on standard (non flex) web page, navigate away page , return via or forward button , restores scroll position @ on page previously. crucial function , annoying if wasn't there - having page automatically go top each time when scrolled way down on long text site. guess browser must managing this,as surprised find deleting cookies, cache , not rid of saved scroll position.

so problem doing on flex web page - correct way it. have been using sharedobject.getlocal, dumbfounded discover once local shared object created , never deleted, there nothing user can in browser delete them (deleting cookies, etc has no effect.) had 100 different sharedobjects in macromedia subdirectory storing nothing scroll positions. standard web pages can delete browsing history, sharedobject they're there unless delve file subdirectory , delete them manually (which of course user never do.) subquestion be, true there no way delete sharedobjects browser. flex calls sharedobjects "flash cookies" in docs, real cookies user can delete them.

my solution have 1 sharedobject url's generated, , sharedobject holds object operating circular buffer. object has properties indexed url, each property pointing session info url (e.g. scroll position, etc.). haven't tested following yet, i've got. if there built in way in flex circular buffer in local sharedobject haven't found it.

function createsessioninfo(url:string,info:object):void {      var so_obj:sharedobject = null;   try {      so_obj = sharedobject.getlocal("session_info","/");   } catch (e:*) {}             if (!so_obj) return;    if (so_obj.data.session == undefined)     so_obj.data.session = new object();    var session:object = so_obj.data.session;    var date:date = new date();   var max:int = 100;   var first:string;   var first_created:int=date.time;   var cnt:int=0   (var p:string in session) {     if (session[p].created < first_created) {       first_created = session[p].created;         first = p;     }     if (++cnt == max)        delete session[first];   }    session[url] = new object();   session[url].created = date.time;   session[url].info = info;  } 

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 -