c# - Sesssion Variables and preventing asp:button from reloading page -
i don't have real world problem, yet, i'm trying learn more context.session[] variables , postback mechanism writing basic little image deally. have asp:image control imageurl set "image.aspx" on test.aspx page.
image.aspx reads context.session["test"] variable , calls gfx.drawstring(context.session["test"],...) canvas. part easy.
then on test.aspx have asp:button. when button pressed, onclick method changes context.session["test"] current time using datetime.now.
now here i'm trying do. want button perform postback can update context.session["test"] variable don't want page reload, in javascript want refresh src field on image after small time delay allow session variable change.
i'm trying update session variable , image on button click without page appearing reload.
is possible update session variables without page refresh?
is possible, or off base?
to update session variables, have server - are.
to server without page appearing reload, use ajax.
there various ways use ajax basic using xmlhttprequest , xmlhttpresponse classes.
Comments
Post a Comment