<script runat="server">.
<form id="form1" runat="server"> <asp:Label ID="lbl" runat="server"><br /> <asp:TextBox ID="Text1" runat="server"> <asp:Button ID="Button1" runat="server" Text="Button" /> </form> <%--/* javascript starts here*/--%> <script language="JavaScript"> function getParams(){ var idx = document.URL.indexOf('?'); var params = new Array(); if (idx != -1) { var pairs = document.URL.substring(idx+1, document.URL.length).split('&'); for (var i=0; i<pairs.length; i++){ nameVal = pairs[i].split('='); params[nameVal[0]] = nameVal[1]; } } return params; } params = getParams(); firstname = unescape(params["firstname"]); lastname = unescape(params["lastname"]); age = unescape(params["age"]); //document.write("firstname = " + firstname + "<br>"); //document.write("lastname = " + lastname + "<br>"); //document.write("age = " + age + "<br>"); //document.getElementById('<%=lbl.ClientID%>').innerHTML = firstname; document.forms["form1"].elements["Text1"].value = firstname; </script> </body>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)