asp.net mvc - How to write on MVC web-page result of continuous operations -
i have continuous operation on web-server (read-write cycle sourceftp targetftp many transformation data). technology of site asp mvc 3. how may write web-page result of successful portion of operation - such response.write, page complex (master page , many controls). example
function start() actionresult while true ... response.write (".") 'how this??? ... end while end function
you don't use response.write() in mvc application. , definitely don't use infinite loop, since cause page never finish processing , never sent browser.
if understand correctly, want display page user , have page update information server. if that's case don't want long-running process on page, want separated page. page presents ui, going contain javascript code update ui based on data received server.
in order push updates server browser, take @ signalr. there couple of different ways it, depending on browser supports, , library abstracts them nicely.
specifically, this walk-through sounds it's close functionality you're looking for. there's server-side loop process information , client-side loop update ui in response information. , signalr provides communication channel between two.
essentially you're asking not trivial operation , broad. basics of can't expect browser , server communicate in real-time on own. need write code that.
Comments
Post a Comment