I am trying to create a simple webform using asp.net. I created a new website and added a new webform called Default2.aspx. For some reason visual studio is not reading the entirecode between @{ if (IsPost) and the else block. It only reads the code between
.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
@{
if (IsPost)
{
string companyname = Request["CompanyName"];
string contactname = Request["ContactName"];
<p>You entered: <br/>
Company Name: @companyname <br/>
Contact Name: @contactname </p>
}
else
{
<form method="post" action="get">
Company Name:<br/>
<input type=&qu ...
Go to the complete details ...