We can use JavaScript to set the value of a hidden control and get its value at the server after a post back.
<input id="Hidden1" type="hidden" /> <script type="text/JavaScript"> var str=”hello” document.getElementByID(“Hidden1”).value=str</script>
protected void Page_Load(object sender, EventArgs e) { string str=request["Hidden1"].ToString(); }
Related posts:
0 comments:
Post a Comment
Your comments: