0

I have two files html and .aspx, both the files have two text boxes. When user files values in text box in html page and click submit, values should be filled in .aspx page. I tried many ways but could not get the exact thing what I needed.

1 Answer 1

2

you can just use simple HTML form GET method like this:

//your html file e.g. HtmlPage1.html

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<title></title> </head> <body>
<form action="WebForm1.aspx" method="get">
    Choose your favorite subject:
    <button name="subject" type="submit">send my value</button>
    <input id="name" name="name"  type="text" />
</form> </body> </html>

//your aspx file e.g. WebForm1.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="AssessorsLounge.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">
<title></title> </head> <body>
<form id="form1" runat="server">
<div>
<%: Request.QueryString["name"].ToString() %>
</div>
</form> </body> </html>

you could learn more about html and asp.net on www.w3schools.com

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.