Am facing a very strange issue. I've a hidden fields as shown below.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="http://code.jquery.com/jquery-1.9.0.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:HiddenField ID="hid_test" ClientIDMode="Static" runat='server' />
</div>
</form>
<script language="javascript" type="text/javascript">
$(function () {
alert($('#hid_test').val());
});
</script>
</body>
</html>
And in server side am setting a value to the hidden field as follows
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
hid_test.Value = "abcd"
End If
End Sub
Very simple code. So in the first run the alert shows as "abcd" since am setting that from server side. OK.. Thats fine.
Then what I did was I changed hidden field value using jquery from console as below
$('#hid_test').val('12');
After this change does when I hit F5 (Page reloads) obviously my server side code hits and the hidden fields value should be changed to abcd
But when the page loads the alert says 12 itself. Means its keeping the value set from client side. Any kind help appreciated. Am testing in Firefox.
I disabled FF form fill feature as follows