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.

multithreading - WPF Dispather.Run throws NullReferenceException -


i working in wpf application have datagrid updated different thread. datacontext of usercontrol set datatable, , everytime click button, datatable gets updated, , hence datagrid. that's working fine.

the problem when start clicking button several times, application breaks , throws following exception in dispatcher.run:

location: void movetoposition(system.windows.controls.primitives.generatorposition, system.windows.controls.primitives.generatordirection, boolean, generatorstate byref) type: nullreferenceexception fullname: system.nullreferenceexception message: object reference not set instance of object.

stacktrace: @ system.windows.controls.itemcontainergenerator.movetoposition(generatorposition position, generatordirection direction, boolean allowstartatrealizeditem, generatorstate& state) @ system.windows.controls.itemcontainergenerator.generator..ctor(itemcontainergenerator factory, generatorposition position, generatordirection direction, boolean allowstartatrealizeditem) @ system.windows.controls.itemcontainergenerator.system.windows.controls.primitives.iitemcontainergenerator.startat(generatorposition position, generatordirection direction, boolean allowstartatrealizeditem) @ system.windows.controls.virtualizingstackpanel.measureoverride(size constraint) @ system.windows.controls.primitives.datagridrowspresenter.measureoverride(size constraint) @ system.windows.frameworkelement.measurecore(size availablesize) @ system.windows.uielement.measure(size availablesize) @ system.windows.contextlayoutmanager.updatelayout() @ system.windows.contextlayoutmanager.updatelayoutcallback(object arg) @ system.windows.media.mediacontext.invokeonrendercallback.dowork() @ system.windows.media.mediacontext.fireinvokeonrendercallbacks() @ system.windows.media.mediacontext.rendermessagehandlercore(object resizedcompositiontarget) @ system.windows.media.mediacontext.rendermessagehandler(object resizedcompositiontarget) @ system.windows.threading.exceptionwrapper.internalrealcall(delegate callback, object args, int32 numargs) @ ms.internal.threading.exceptionfilterhelper.trycatchwhen(object source, delegate method, object args, int32 numargs, delegate catchhandler) @ system.windows.threading.dispatcheroperation.invokeimpl() @ system.windows.threading.dispatcheroperation.invokeinsecuritycontext(object state) @ system.threading.executioncontext.runtrycode(object userdata) @ system.runtime.compilerservices.runtimehelpers.executecodewithguaranteedcleanup(trycode code, cleanupcode backoutcode, object userdata) @ system.threading.executioncontext.runinternal(executioncontext executioncontext, contextcallback callback, object state) @ system.threading.executioncontext.run(executioncontext executioncontext, contextcallback callback, object state, boolean ignoresyncctx) @ system.threading.executioncontext.run(executioncontext executioncontext, contextcallback callback, object state) @ system.windows.threading.dispatcheroperation.invoke() @ system.windows.threading.dispatcher.processqueue() @ system.windows.threading.dispatcher.wndprochook(intptr hwnd, int32 msg, intptr wparam, intptr lparam, boolean& handled) @ ms.win32.hwndwrapper.wndproc(intptr hwnd, int32 msg, intptr wparam, intptr lparam, boolean& handled) @ ms.win32.hwndsubclass.dispatchercallbackoperation(object o) @ system.windows.threading.exceptionwrapper.internalrealcall(delegate callback, object args, int32 numargs) @ ms.internal.threading.exceptionfilterhelper.trycatchwhen(object source, delegate method, object args, int32 numargs, delegate catchhandler) @ system.windows.threading.dispatcher.invokeimpl(dispatcherpriority priority, timespan timeout, delegate method, object args, int32 numargs) @ ms.win32.hwndsubclass.subclasswndproc(intptr hwnd, int32 msg, intptr wparam, intptr lparam) @ ms.win32.unsafenativemethods.dispatchmessage(msg& msg) @ system.windows.threading.dispatcher.pushframeimpl(dispatcherframe frame) @ system.windows.threading.dispatcher.pushframe(dispatcherframe frame) @ system.windows.threading.dispatcher.run() @ sequoia.dashboard.apps.risk.utils.base.baseappprocessor.runuserinterface(object method) @ system.threading.threadhelper.threadstart_context(object state) @ system.threading.executioncontext.run(executioncontext executioncontext, contextcallback callback, object state, boolean ignoresyncctx) @ system.threading.executioncontext.run(executioncontext executioncontext, contextcallback callback, object state) @ system.threading.threadhelper.threadstart(object obj)

any ideas?

thanks in advance.


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 -