Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Friends,

Please help me to find the best solution for the following question

Create two HTML pages
a. First page with the following features
i. An image(logo) with a company name as the heading in the top center
ii. This page containing an HTML form, two text boxes to get First Name, Second Name of the user
iii. A submit button to the submit the data to the next page
b. The Second page receives the data submitted by the First Page, displays the following message
Welcome <Last Name>, <First Name>
Posted
Comments
Abdul Quader Mamun 19-Nov-11 9:27am    
Send your code.
[no name] 19-Nov-11 10:17am    
Why?
[no name] 19-Nov-11 10:18am    
This is extremely basic ASP.NET, every book on the subject should cover this.
Denno.Secqtinstien 22-Nov-11 1:07am    
use javascript to do this ..
Rupanjana 22-Nov-11 5:34am    
I tried with the following HTML code:

For the first page

<html>
<head></head>
<body>

<p align="center"><img border ="0" src="C:\Documents and Settings\pawan\My Documents\My Pictures\header-bg.png" hieght="100" width="100"/>GenSet</p>



<form name="frm" action="sec.htm">
<table><tr><td>Enter First Name :</td><td><input type="text" name="t1" /></td><tr>
<tr><td>Enter Second Name :</td><td><input type="text" name="t2" /></td><tr>
<tr><td align="center" colspan="2"><input type="button" name="b1" value="Next Page" / önClick="location.href='sec.htm?name_fst='+document.frm.t1.value+'&name_lst='+document.frm.t2.value"></td><tr>
</table>
</form>
</body>
</html>

The HTML Code for the second page is

<html>
<head>
<script language="javascript">
function display()
{
origurl=document.URL;
name_fst=origurl.substring(origurl.IndexOf("name_fst")+9,origurl.IndexOf('&'));
name_lst=origurl.substring(origurl.IndexOf("name_lst")+9,origurl.length)l;
document.Write("Welcome "+name_lst+", "+name_fst);
}
</script>
</head>
<body önLoad="javascript:display();">
</body>
</html>

1 solution

Hi,
Rupanjana

Please check following link:

Passing Values from One Page to Another Page – ASP.NET[^]

Thanks,
Imdadhusen
 
Share this answer
 
Comments
Rupanjana 1-Dec-11 2:29am    
I want to pass value one HTML page to another HTML page and also want to show the value in second page.How it can be possible?Tell me the way.Please..

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