I was hoping that someone would be able to advise why the asp:Textbox on the below aspx page does not render. When I run the project the html for the text box does not exist?
PatientOtherNames.aspx:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="PatientOtherNames.aspx.vb" Inherits="PatientOtherNames" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>PatientOtherNames</title>
</head>
<body>
<asp:Textbox runat="server" id="test" width="40px" />
</body>
</html>
PatientOtherNames.aspx.vb:
Partial Class PatientOtherNames
Inherits System.Web.UI.Page
End Class
CodePudding user response:
I hope you should add a (form) tag with runat ="Server"..
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="PatientOtherNames.aspx.vb" Inherits="PatientOtherNames" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>PatientOtherNames</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Textbox runat="server" id="test" width="40px" />
</form>
</body>
</html>