post back

  • Thread starter Thread starter VA Handerson
  • Start date Start date
V

VA Handerson

I coded the simple page using ASP.NET extension.
this code is located under the virtual directory called DEVWRK. I typed
the link as blow and it works

http://localhost/DEVWRK/ASPDOTNET/SimpleHTML.aspx

but when I submit the form, I have a message saying "The page cannot be
displayed". The HTML form should post back to itself. what did I do
wrong?

------------------------------------------

<html>
<head>
<title>Simple HTML Page</title>
</head>

<body>

<form method="post" action="SimpleHTML.aspx">
<b>Username:</b>
<br><input name="username" type="Text" size="30">
<P>
<b>Comments:</b>
<br><textarea name="comments" cols="60" rows="10"></textarea>
<p>
<input type="Submit" value="Add Comment">
</form>
</body>
</html>
 
VA Handerson said:
I coded the simple page using ASP.NET extension.
this code is located under the virtual directory called DEVWRK. I typed
the link as blow and it works

http://localhost/DEVWRK/ASPDOTNET/SimpleHTML.aspx

but when I submit the form, I have a message saying "The page cannot be
displayed". The HTML form should post back to itself. what did I do
wrong?

------------------------------------------

<html>
<head>
<title>Simple HTML Page</title>
</head>

<body>

<form method="post" action="SimpleHTML.aspx">
<b>Username:</b>
<br><input name="username" type="Text" size="30">
<P>
<b>Comments:</b>
<br><textarea name="comments" cols="60" rows="10">
 
I think the root of the problem is that the "aspx" page is NOT an ASPX page.
What you have is an HTML page with an ASPX extension. Give it an HTM or HTML
extension and it should work.

If you want to do an ASPX page you will have to create and build a complete
"solution".
 
Yeah, I thought so. I was following the Sams ASP.NET Unleased book
example. It was the first sample in the chapter one and it was saved as
..aspx with html code in it and did not say anything about the error.
thanks anyway.
 
Back
Top