Last post Mar 30, 2012 03:28 PM by mjocasio
Mar 30, 2012 01:35 PM|mjocasio|LINK
Is there a way you could pass java script variables values between pages without using queryString. I try to implement Catch.Insert but is not recognize in the java script word.
Mar 30, 2012 02:15 PM|roopeshreddy|LINK
If you are using HTML5, you can also take advantage of localStorage and
Hope it helps u...
Mar 30, 2012 02:17 PM|mjocasio|LINK
For sensitive data, I believe using cookies is not the best approach.
Mar 30, 2012 02:20 PM|roopeshreddy|LINK
Yeah! If you have sensitive data, then Client side state management is not at all recommended!
You have to consider using Server side statemanagement!
Mar 30, 2012 02:28 PM|mjocasio|LINK
Right... but I have not found a way that I could pass the java script variable values to server side. The other challenge is that I'm creating the form dynamically. If Create a page 1 and then I call page 2.
Is there a bridge that I could move the values (client to server) so there I retrieve on page 2.
I try using Cache.Insert, but server command is not recognize in the Java script world. And If I use it inside server script then the document.getElementById is not recognize.
It sound the only way will be to redirect my call from java script client routine to a java script server and pass the value as argument.
Right... but I have n;t found a way that I could pass the java script variable values to server side. The other chamlenge is that I'm creating the form dynamlcly
Mar 30, 2012 02:56 PM|roopeshreddy|LINK
Check the below code!
<asp:HiddenField runat="server" ID="myHiddenField" />
document.getElementById('<%=myHiddenField.ClientID %>').value = "data to pass to different page";
<asp:Button runat="server" Text="Get" OnClick="GetData" />
protected void GetData(object sender, EventArgs e)
//Retrieve the data from hidden field
string strData = myHiddenField.Value;
//Store the data in Session
Session["myData"] = strData;
Mar 30, 2012 03:28 PM|mjocasio|LINK
From where the ClientID came from?