Click here to Skip to main content
15,914,013 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello
i have an html page with the form tag, I have to pass the form textbox value to the my asp.net project for mail. how can i pass the value of my html form's textbox value to the aspx page.
Posted

you can write javascript function to pass the value as Query String.

XML
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Untitled Page</title>
    <script language="javascript">
        function fnopenPage()
        {
            var val = document.getElementById('txtBoxId').value;
            var url = 'Page2.aspx?value=' + val +'';
            window.open(url,'_blank');
        }
    </script>
</head>
<body>
    <form runat="server">
        <input id="txtBoxId" type="text" />
       <u>
        <span id="id1" onclick="fnopenPage()">Click Here</span>
       </u>

    </form>
</body>
</html>


Please mark as answer if it solved your problem

with regards
Karthik Harve
 
Share this answer
 
v2
Comments
niravbhavsar 2-Dec-11 8:55am    
thanks.
but i want to open in same window.
so what change i try?
Hi,

You can pass parameters by using Pagemethod.
 
Share this answer
 
Comments
niravbhavsar 2-Dec-11 9:04am    
can you give me the link so i can refer it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900