I have a hidden field in my master page. And I set the current date and time as a value in that \"hiddenfield\" using Javascript. I am unable to get this hidden field value
modified code from This link:
At this point i would concatenate all of the fields together and put them in an asp:HiddenField control so they can be read on the server. On the server, call Convert.ToDateTime() on the Text value of your HiddenField.
if you don't use a masterpage you should try this.
HiddenField hdnFieldValue = (HiddenField)PreviousPage.FindControl("hdnField");
Updated:
Put a hidden field on the page.
in your javascript function
var childHidden = document.getElementById('<%hidChild.ClientID%>');
childHidden.value = window.opener.document.getElementById('text1').value;
Now access this hidden control on the page load event.
Response.Write(hidChild.Value); or Session["ParentVal"]=hidChild.Value;