Click here to Skip to main content
15,897,360 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using asp:BoundField to bind it with a specific column of a database tables, but use of this is giving error while debugging the project.

here is the design time code i have written. Where i am doing mistake plz assist me to come out.
XML
<div class="div_scroll" runat="server">
   <asp:GridView runat="server" ID = "gvIssues1" AutoGenerateColumns="false"  datakeynames="question,question_id" >
   <Columns>
   <asp:BoundField  HeaderText="Issues"ReadOnly="true" DataField="question" />
   <asp:BoundField  HeaderText="IssuesID"ReadOnly="true" DataField="question_id" Visible="false"/>
   </Columns>
   </asp:GridView></div>


It gives the following error...
Quote:
Literal content ('<asp:BoundField HeaderText="Issues"ReadOnly="true" DataField="question" /> <asp:BoundField HeaderText="IssuesID"ReadOnly="true" DataField="question_id" Visible="false"/>') is not allowed within a 'System.Web.UI.WebControls.DataControlFieldCollection'.
Posted
Comments
VICK 4-Nov-13 7:23am    
HeaderText="Issues"ReadOnly="true"

Omission of space between two properties might be causing this.. Try after separating them.

1 solution

Having a look at the following(s) might solve your problem or will provide you hint to solve it.


Literal Content Error with BoundField

Literal Content Issue

Hope it will help. :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900