Hi All..
This Code Write On aspx file .This Code set the value in hidden field..But This Code Does not Work Properly
<html><head></head>
<body>
<script type= "text/javascript">
function showDialogue() {
var a = Screen.Width;
var b = Screen.hieght;
document.getElementById('HiddenField1').value = a;
document.getElementById('HiddenField2').value = b;
}
</script>
<form id="form1" runat="server" >
<asp:HiddenField ID="HiddenField1" runat="server" />
<asp:HiddenField ID="HiddenField2" runat="server" />
</form>
</body>
</html>
in code Behind ::
On page Load Am Calling JavaScript function.Page.ClientScript.RegisterStartupScript([GetType](), "MyKey", "showDialogue();", True)
I am also Calling Javascript in Another way:Dim localScreenWidth As String = " <script type='text/javascript'>showDialogue();</script>"
then retrive The Hidden Field..Label2.Text = HiddenField1.Value
Label3.text=HiddenField2.value
But I am Not getting any Hidden field value.Give me a Idea ,How I am getting Hiddenfield value???