0

My Try 1:

var a=confirm('Do You Really want to Save this Record?') ;
document.getElementById('Hidden.ClientID') = a;

My Try 2:

var a=confirm('Do You Really want to Save this Record?') ;
document.getElementById('Hidden.ClientID').value = a;

Code Behind :

Response.Write(Hidden.Value);
Response.End();

////////// Why Value is Not getting stored in Hidden Field?

1
  • provide more code that accessing hiddin field and how are you using hidden field.. Commented Jul 13, 2012 at 14:40

2 Answers 2

2

Try,

var ele=document.getElementById('<%=Hidden.ClientID%>');
ele.value=a;
Sign up to request clarification or add additional context in comments.

2 Comments

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Ok.. Error GOne.. but Still Value not getting Stored.. Shows me Blank Value as its "" at Design time
2

Working Code see

document.getElementById('<%=Hidden.ClientID%>').value="a";

    Code Behind :        
    Response.Write(Hidden.Value);
    Response.End();

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.