in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

how to get Session's value in the controls client side event

Last post 11/11/2008 1:31 AM by Chris W Walsh. 1 replies.
Page 1 of 1 (2 items)
Sort Posts:
Previous Next
  • 11/10/2008 11:14 PM

    how to get Session's value in the controls client side event

    hi,

    I have set

    protected void Page_Load(object sender, EventArgs e) {

    Session["test"] = "sample"; }

     and there is a ASPxButton there, in its client side click event. I want to get this Session's Value

    so I set
    function(s, e) {
    var a = '<%=Session["test"]%>'
    alert(a);
    }

    but the above code did not work in your control client side event. Can you tell me how to get Session's value in your Control client event.

  • 11/11/2008 1:31 AM In reply to

    Re: how to get Session's value in the controls client side event

    yang, 

    you cannot access server session variables on the client, to do that, you will need to use a postback or a callback

Page 1 of 1 (2 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED