Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 6th, 2010, 07:09 PM
Authorized User
Points: 395, Level: 6
Points: 395, Level: 6 Points: 395, Level: 6 Points: 395, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: May 2007
Location: London, , United Kingdom.
Posts: 73
Thanks: 4
Thanked 0 Times in 0 Posts
Default update gridview record

Hi i am trying to update record inside gridview. although i am not getting any error but its not updating the record either.

<asp:GridView ID="GV_ApproveNomination" runat="server" AutoGenerateColumns ="TRUE" DataKeyNames="ContestantID" DataSourceID ="sqlDataSource1">

<asp:BoundField DataField="ContestantID" HeaderText="ContestantID" />
<asp:BoundField DataField="iContestantName" HeaderText="Contestant Name" />
<asp:BoundField DataField="iContestantCompany" HeaderText="Contestant Company" />
<asp:CommandField ShowEditButton="True"/>

<asp:TemplateField HeaderText="ContestantID" SortExpression="ContestantID">
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Activate") %>'></asp:TextBox>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Activate") %>'></asp:Label>



<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:GAConnectionString %>"
SelectCommand ="SELECT [ContestantID], [iContestantName] ,[iContestantCompany] ,[iContestantStore] ,[iNominationText] ,[iNominatorPhone] ,[iNominatorEmail], [Activate] FROM [NhmMicrosites].[dbo].[SMOTY_tblContestant]"
UpdateCommand ="UPDATE SMOTY_tblContestant SET Activate =@Activate where ContestantID = @ContestantID"
<asp:Parameter Name="Activate" Type ="int32" />
<asp:Parameter Name="ContestantID" Type ="int32" />

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gridview Update not firing in Update Panel akshay144 Ajax 1 August 13th, 2009 10:20 AM
Using a dropdown box in a GridView - How do I update the record with the dd's value? RushNP774 ASP.NET 3.5 Basics 14 March 15th, 2009 02:57 AM
Disp Footer even no record in GridView Datasource mallikalapati ASP.NET 2.0 Professional 1 March 19th, 2008 02:23 AM
Problem with: Add new record in GridView kalchev ASP.NET 2.0 Basics 0 April 26th, 2006 07:59 AM
Select gridview record with mouseclick wirerider ASP.NET 2.0 Basics 2 March 9th, 2006 01:44 PM

All times are GMT -4. The time now is 02:54 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.