Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6179957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:45:37+00:00 2026-05-24T00:45:37+00:00

I have a Table that is generated using a SQL Database And put into

  • 0

I have a Table that is generated using a SQL Database And put into a asp:Repeater to display the data.

The table displays fine, with all relevant data. All is happy!

But The information in the table may need to be changed sometimes by the user. Rather than having a separate page or even separate section where a user can submit edits, I came up with an idea the make each CELL in the table a text box. And on page the, the text of each text box is set to the database values.

So the table will display and be EXACTLY the same, except each cell will be editable. But I’m having trouble getting it to work. What I’ve got so far is:

<asp:Repeater ID="rptPending" runat="server">
    <HeaderTemplate>
        <table id="tblPending" cellpadding="0" cellspacing="0" border="0" class="display">
            <thead>
                <tr>
                    <th>Company Name</th>
                    <th>Telephone</th>
                    <th>Fax Number</th>
                    <th>Address Line 1</th>
                    <th>Address Line 2</th>
                    <th>City</th>
                    <th>Postcode</th>
                    <th>Company User</th>
                </tr>
            </thead>
            <tbody>
    </HeaderTemplate>
    <ItemTemplate>
        <form id="form" runat="server">
            <tr>
                <td><asp:TextBox ID="companyName" runat="server" AutoPostBack="true" Text="<%# Eval("_companyName") %>"></asp:TextBox></td>
                <td><asp:TextBox ID="companyName" runat="server" AutoPostBack="true" Text="<%# Eval("_telephone")%>"></asp:TextBox></td>
                <td><asp:TextBox ID="companyName" runat="server" AutoPostBack="true" Text="<%# Eval("_faxNo")%>"></asp:TextBox></td>
                <td><asp:TextBox ID="companyName" runat="server" AutoPostBack="true" Text="<%# Eval("_addressLn1")%>"></asp:TextBox></td>
                <td><asp:TextBox ID="companyName" runat="server" AutoPostBack="true" Text="<%# Eval("_addressLn2")%>"></asp:TextBox></td>
                <td><asp:TextBox ID="companyName" runat="server" AutoPostBack="true" Text="<%# Eval("_city")%>"></asp:TextBox></td>
                <td><asp:TextBox ID="companyName" runat="server" AutoPostBack="true" Text="<%# Eval("_postCode")%>"></asp:TextBox></td>
                <td><asp:TextBox ID="companyName" runat="server" AutoPostBack="true" Text="<%# Eval("_name")%>"></asp:TextBox></td>
            </tr>
        </form>
    </ItemTemplate>
    <FooterTemplate>
        </tbody> </table>
    </FooterTemplate>
</asp:Repeater>

In the Old method,between the [td] tags I literally just had the <%# Eval(“variable”) %> statement. So I changed it to the asp:Textbox tag.

I get an error saying server tag is not well formed.

If anybody knows a work around or a better method, it would be very appreciated:)

p.s. No references to asp:DataTable or GridView. I’m not interested in them.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T00:45:39+00:00Added an answer on May 24, 2026 at 12:45 am

    The reason why you’re getting the “not well formed” error is that you’re using double quotes around the eval statement and inside them as well. Simply use single quotes as the surrounding quotes.

    <td>
       <asp:TextBox 
           ID="companyName" 
           runat="server" 
           AutoPostBack="true" 
           Text='<%# Eval("_companyName") %>'
        >
       </asp:TextBox>
     </td>
    

    This however will not solve your overall problem of trying to edit multiple items through a repeater. If the text in any of these boxes is modified, how will you know which row this pertains to?

    Have fun with what you’re trying, but I suspect you will find yourself becoming interested in DataTable and GridView.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MS SQL Srver 2005 Database, that has a table with a
I have a table that's generated by a normal PHP loop. What I want
I have a table that got into the db_owner schema, and I need it
I have a table that has redundant data and I'm trying to identify all
I have a table that is created in a DataList in ASP.Net. This table
I have a table with a column that is a DATETIME in a SQL
I have long tables generated by datagrid control that go beyond the page width.
I'm working on databases that have moving tables auto-generated by some obscure tools. By
I have a script that takes a table name and generates a control file
I have a table that contains tasks and I want to give these an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.