Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to post a CodeProject article, after downloading submission template file.I have put below asp.net source code but it is not showing in pre tag.i have mention lang="aspnet" then also not showing..any suggestion??


ASP.NET
<asp:GridView ID="grdPopOver" runat="server" AutoGenerateColumns="False"  HeaderStyle-BackColor="MediumPurple" class="table">
   <Columns>
   <asp:TemplateField HeaderText="UserId" ControlStyle-Font-Bold="true">
   <ItemTemplate>
   <a href="#" id="example" class="btn btn-success" rel="popover" data-original-title="User Details"><%#Eval("UserId")></a>
   <div id="dvPopOver" style="display:none">
    <table>
    <tr >
    <td>FirstName: </td>
    <td><%# Eval("FirstName")></td>
     </tr>
       <tr > <td>LastName: </td>
       <td><%# Eval("LastName")></td>
       </tr>
       <tr >
       <td>City: </td>
       <td><%# Eval("City")></td>
       </tr>
        <tr >
       <td>PhoneNo: </td>
       <td><%# Eval("PhoneNo")></td>
       </tr>
     </table>
   </div>
   </ItemTemplate>
   </asp:TemplateField>
   <asp:TemplateField HeaderText="FirstName" >
    <ItemTemplate>
     <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("FirstName")>'></asp:Label>
   </ItemTemplate>
   </asp:TemplateField>
   <asp:TemplateField HeaderText="LastName" >
   <ItemTemplate>
   <asp:Label ID="lblLastName" runat="server" Text='<%#Eval("LastName") >'></asp:Label>
   </ItemTemplate>
   </asp:TemplateField>
   <asp:TemplateField HeaderText="City" >
   <ItemTemplate>
   <asp:Label ID="lblCity" runat="server" Text='<%#Eval("City") >' ></asp:Label>
   </ItemTemplate>
   </asp:TemplateField>
   <asp:TemplateField HeaderText="PhoneNo" >
    <ItemTemplate>
     <asp:Label ID="lblPhoneNo" runat="server" Text='<%#Eval("PhoneNo") >'></asp:Label>
   </ItemTemplate>
   </asp:TemplateField>
   </Columns>
      </asp:GridView>
Posted

1 solution

You'll want to read through http://www.codeproject.com/info/Submit.aspx[^] as well as the Article FAQs, Code Project Article FAQ[^]

If you still have a problem there is a forum for this type of question, http://www.codeproject.com/Forums/1641/Article-Writing.aspx[^]
 
Share this answer
 
Comments
Amol Jadhao 26-Feb-14 8:17am    
I have read all details..but problem is when you put above code into submission template file it is not showing/view
Amol Jadhao 26-Feb-14 8:18am    
this problem with only asp.net source code not C# code
ZurdoDev 26-Feb-14 8:20am    
OK. I would report it in the Article Writing forum so someone who works with CP can determine if it is a bug or the proper way to do it.

You may just want to use the pre tag for xml.
Amol Jadhao 26-Feb-14 8:25am    
Ok..thanks..you can check, putting above code into Sample code project Template file.

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



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