vijaysri
July 29th, 2003, 03:46 PM
I am getting an error when I run the following example.When I include form runat="server in the HTML body section of the following code the server is displaying the Holiday Page,but when I click the submit button the server is producing an error.
"The viewstate is invalid for this page and might be corrupted. "
I need help
---------
holidaypage.aspx
-------------------
<html>
<head>
<title>Holiday Page</title>
</head>
<body>
<form action="holidayresponsepage.aspx" method="post">
<h1>Vijay Holidays</h1>
Please enter details here.
<br /><br />
Name:<asp:textbox id="FullName" runat="server" />
<br/><br/>
Address:<asp:textbox id="Address" rows=5 textmode="multiline" runat="server"/>
<br/><br/>
Sex-<asp:radiobuttonlist id="Sex" runat="server">
<asp:listitem value="Male"/>
<asp:listitem value="Female"/>
</asp:radiobuttonlist>
Please select the destination you would like details on:
<asp:dropdownlist id="Destination" runat="server">
<asp:listitem value="Madrid"/>
<asp:listitem value="Barcelona"/>
<asp:listitem value="Lisbon"/>
<asp:listitem value="Oslo"/>
<asp:listitem value="Prague"/>
</asp:dropdownlist>
<br/><br/>
<input type="submit">
<input type="Reset">
</form>
</body>
</html>
---------
holidayresponsepage.aspx Code
-------------------------------------
<script runat="server" language="vb">
sub page_Load()
response.write("<b>Name:</b> " + request.form("FullName") + "<br/>")
response.write("<b>Address:</b> " + request.form("Address") + "<br/>")
response.write("<b>Sex:</b> " + request.form("Sex") + "<br/>")
response.write("<b>Destination:</b> " + request.form("Destination") + "<br/>")
end sub
</script>
<html>
<head>
<title>Holiday Page</title>
</head>
<body>
<br/><br/>
These details have been entered into our database, you should receive a confirmation email from us shortly
<br/><br/>
</body>
</html>
[Sonu Kapoor: please use the code tag before entering some code]
"The viewstate is invalid for this page and might be corrupted. "
I need help
---------
holidaypage.aspx
-------------------
<html>
<head>
<title>Holiday Page</title>
</head>
<body>
<form action="holidayresponsepage.aspx" method="post">
<h1>Vijay Holidays</h1>
Please enter details here.
<br /><br />
Name:<asp:textbox id="FullName" runat="server" />
<br/><br/>
Address:<asp:textbox id="Address" rows=5 textmode="multiline" runat="server"/>
<br/><br/>
Sex-<asp:radiobuttonlist id="Sex" runat="server">
<asp:listitem value="Male"/>
<asp:listitem value="Female"/>
</asp:radiobuttonlist>
Please select the destination you would like details on:
<asp:dropdownlist id="Destination" runat="server">
<asp:listitem value="Madrid"/>
<asp:listitem value="Barcelona"/>
<asp:listitem value="Lisbon"/>
<asp:listitem value="Oslo"/>
<asp:listitem value="Prague"/>
</asp:dropdownlist>
<br/><br/>
<input type="submit">
<input type="Reset">
</form>
</body>
</html>
---------
holidayresponsepage.aspx Code
-------------------------------------
<script runat="server" language="vb">
sub page_Load()
response.write("<b>Name:</b> " + request.form("FullName") + "<br/>")
response.write("<b>Address:</b> " + request.form("Address") + "<br/>")
response.write("<b>Sex:</b> " + request.form("Sex") + "<br/>")
response.write("<b>Destination:</b> " + request.form("Destination") + "<br/>")
end sub
</script>
<html>
<head>
<title>Holiday Page</title>
</head>
<body>
<br/><br/>
These details have been entered into our database, you should receive a confirmation email from us shortly
<br/><br/>
</body>
</html>
[Sonu Kapoor: please use the code tag before entering some code]