Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does my ASP.NET App show an extra table?
    text
    copied!<p>This is a hybrid (MVC and Web forms) Web app to rate doctors. Here is my code for the ratings Web form. Why is there an extra table with the first record under the GridView? It happened after I pressed "Select" in the first row, but why does it stay there after I stop and run it again? It's not a cache problem, because it shows in different browsers. Thanks in advance!</p> <p><img src="https://i.stack.imgur.com/5wLKh.jpg" alt="enter image description here"></p> <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="Rating.aspx.cs" Inherits="MidtermApplication.Rating" %&gt; &lt;asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"&gt; &lt;/asp:Content&gt; &lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"&gt; &lt;asp:ObjectDataSource ID="ObjectDataSourceDoctor" runat="server" DeleteMethod="Remove" InsertMethod="Add" SelectMethod="GetDoctor" TypeName="MidtermApplication.Models.TestApplicationDoctorRepo" UpdateMethod="Update" DataObjectTypeName="MidtermApplication.Models.Doctor"&gt; &lt;/asp:ObjectDataSource&gt; &lt;asp:GridView ID="GridViewDoctor" runat="server" DataSourceID="ObjectDataSourceDoctor" AutoGenerateColumns="False" OnSelectedIndexChanged="GridViewDoctor_SelectedIndexChanged"&gt; &lt;Columns&gt; &lt;asp:ImageField DataImageUrlField="DoctorPicture" HeaderText="DoctorPicture"&gt; &lt;/asp:ImageField&gt; &lt;asp:BoundField DataField="DoctorName" HeaderText="DoctorName" SortExpression="DoctorName" /&gt; &lt;asp:BoundField DataField="DoctorSpecialty" HeaderText="DoctorSpecialty" SortExpression="DoctorSpecialty" /&gt; &lt;asp:TemplateField HeaderText="Rate Now"&gt; &lt;ItemTemplate&gt; &lt;asp:RadioButton ID="RadioButton1" runat="server" GroupName="RateNow" Text="1"&gt;&lt;/asp:RadioButton&gt; &lt;asp:RadioButton ID="RadioButton2" runat="server" GroupName="RateNow" Text="2"&gt;&lt;/asp:RadioButton&gt; &lt;asp:RadioButton ID="RadioButton3" runat="server" GroupName="RateNow" Text="3"&gt;&lt;/asp:RadioButton&gt; &lt;asp:RadioButton ID="RadioButton4" runat="server" GroupName="RateNow" Text="4"&gt;&lt;/asp:RadioButton&gt; &lt;asp:RadioButton ID="RadioButton5" runat="server" GroupName="RateNow" Text="5"&gt;&lt;/asp:RadioButton&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:ButtonField AccessibleHeaderText="Save Rating" HeaderText="Save Rating" Text="Save" /&gt; &lt;asp:CheckBoxField DataField="fave" HeaderText="Favorite" SortExpression="fave" InsertVisible="False" Visible="True" /&gt; &lt;/Columns&gt; &lt;/asp:GridView&gt; &lt;/asp:Content&gt; </code></pre> <p>Code behind:</p> <pre><code>namespace MidtermApplication { public partial class Rating : System.Web.UI.Page { TestApplicationDoctorRepo repo; protected void Page_Load(object sender, EventArgs e) { TestApplicationDoctorRepo.InitApp(this); } protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { } protected void GridViewDoctor_SelectedIndexChanged(object sender, EventArgs e) { } } } </code></pre> <p><img src="https://i.stack.imgur.com/u3tkQ.jpg" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload