asp.net - How can I invoke a javascript trhough a thread? -


i have thread runs querying db , returning values. if values satisfyes condition, want raise message box (javascript alert) client side.

in system, users can post tasks in db, , thread going query database check if user has things do. if user has, system must alert him through message box. text simple, , statik, "hey, dude, go work, lazy!" (i'm joking, message shall "you have new task(s). please check.") it!

i've done javascripts invokings clientscript.registerstartupscript, , attributes.add buttons. want call javascript functions (wich alert user has things do) midle of sub (that executed in thread), without submit, load or click event. how can it?

thanks!

you can't call client side script directly server side code.

the best can use ajax , poll server see when operation completes , @ point call javascript function.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -