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

  • Home
  • SEARCH
  • 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 7895703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:42:27+00:00 2026-06-03T07:42:27+00:00

using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; N00b here, I’ve got the gridview to look the way

  • 0
using Visual.Web.Developer.2010.Express;
using SQL.Server.Management.Studio.2008.R2;

N00b here,

I’ve got the gridview to look the way I want it to (a textbox inside of the ItemTemplate). The Textbox’s class has some client-sideJS that enables a save button (an asp:LinkButton set to look like a Jquery UI save icon) to become visible after the Textbox’s .keypress event fires..
Now for my question..
I’ve looked everywhere, but I can’t get how to have gridview put the Sql server db content in that textbox on Page_load (one textbox + <br /> for each row). I’m only printing one collumn from the Sql server db into the Gridview.. Also, how would I bind the asp:LinkButton save button to gridview’s save event? If there is a more effecient way to do this? If you have some insight for me, please give me your opinion/!

My .aspx code

         <asp:TemplateField >
            <ItemTemplate>

                <asp:TextBox ID="TextBox1" class="hexen" runat="server" DataField="TbValue" SortExpression="TbValue">

                </asp:TextBox>
            </ItemTemplate>
        </asp:TemplateField>
     </Columns>
    </asp:GridView>


<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:FluxConnectionString %>" 
    SelectCommand="SELECT [TbValue] FROM [InvestigateValues]">
</asp:SqlDataSource>

Thanks in advance!

  • 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-06-03T07:42:28+00:00Added an answer on June 3, 2026 at 7:42 am

    Change your text box to

    <asp:TextBox ID="TextBox1" class="hexen" runat="server" text='<%#Bind("TbValue")%>' />
    

    This will enable two way databinding.

    Here is an article to get you started: http://www.devx.com/DevX/Article/35058.

    The grid view and SqlDataSource expose Insert, Update and Delete event/methods. These are on a row level, not grid level.

    The way I would approach your problem would be to have an onclick event for your link button that iterates through the gridview, get the data from each text box and then perform the appropriate data base action in the code behind.

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

Sidebar

Related Questions

using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; Kinda new at C# here.. I got the first row
using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; N00b here, I have a GridView, but I want to
using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; using Northwind; N00b here, Trying to customize a asp.net gridview
using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; What I'm ultimately trying to do is update a sql
I'm using Visual Web Developer 2010 Express and SQL Server 2008 R2 Management Studio
using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studios.R2.Express; What I'm trying to do, is get a button to
I'm using Visual Web Developer 2010. I created a sql server connection to a
I'm building an ASP.net application using Visual Studio Web Developer 2010 Express and have
I created a new ASP.NET website using Visual Web Developer 2008 Express edition and
Hi all I've just started a new project using Visual Web Developer 2008 Express

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.