Home »
MCQs »
ASP.Net MCQs
Which of the following syntax is correct to create a textbox in ASP.NET?
127. Which of the following syntax is correct to create a textbox in ASP.NET?
- <asp:TextBox ID="txtname" runat="server"></asp:TextBox>
- <TextBox ID="txtname" runat="server"></TextBox>
- <asp.net:TextBox ID="txtname" runat="server"><asp.net/TextBox>
- <asp-TextBox ID="txtname" runat="server"><asp-TextBox>
Answer: A) <asp:TextBox ID="txtname" runat="server"></asp:TextBox>
Explanation:
The 1st syntax is correct to create a textbox in ASP.NET.