[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Can't I have my repeater inside a table?

Posted on 2011-03-18
1
Medium Priority
?
1,136 Views
Last Modified: 2012-06-21
I have the code below which is basically my table with a repeater that will then display each row.

This was working fine until I had to add runat="server" and an id to my table.

I had to do this as I need to export the table to excel but I am now getting:
BC30311: Value of type 'System.Web.UI.WebControls.Repeater' cannot be converted to 'System.Web.UI.HtmlControls.HtmlTableRow'.

Is there any way around this?

Thanks in advance.
<table class="gridviewheader" runat="server" id="tblCostPrice" cellpadding="0" border="1" cellspacing="0">
        <tr>
            <th>
                Invoice Number
            </th>
            <th>
                Query
            </th>
        </tr>    
        <asp:Repeater ID="rptCostPrice" runat="server" >                                       
            <ItemTemplate>
            <tr>

Open in new window

0
Comment
Question by:scm0sml
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
coolcurrent4u earned 2000 total points
ID: 35164080
if you need to export the table to excel, there are two things you can do,

1. when generating the table, you can also generate a the data to export to excel by having a function that will convert the data if retrieved from database to a cvs format to export to excel
 
2. you can have a JavaScript function that will do the conversion by taking the table in the page and converting accordingly.

An example is found here
http://forums.asp.net/t/1259131.aspx
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question