Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 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
 
Old September 22nd, 2006, 06:02 AM
Registered User
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update using the datagrid in C#

I want to update the current user to UserName field in my database from a login control which identifies the current user as
<% = CheckLoginStatus1.CurrentUser.UserName%>.
I have a datagrid with the update function. It is able to pick the current user, but the database UserName field does not get updated on update.

Please find below my attempt.

ItemTemplate
<input type="text" name="UserName" value="<% = CheckLoginStatus1.CurrentUser.UserName%>" />

EditItemTemplate
<asp:TextBox runat="server" id="UserName" Text='<%# DataBinder.Eval(Container.DataItem,
"UserName") %>'/>

No error messages are returned. Please help.


ja





Similar Threads
Thread Thread Starter Forum Replies Last Post
Update a datagrid debbiecoates Beginning VB 6 0 January 4th, 2008 05:51 AM
datagrid update sumith ASP.NET 1.0 and 1.1 Basics 0 February 9th, 2007 02:14 AM
Datagrid.update() and DataAdapter.Update aarunlal ASP.NET 2.0 Professional 2 February 23rd, 2006 11:41 PM
Datagrid Update madhavigujja ASP.NET 1.0 and 1.1 Basics 1 December 18th, 2005 03:10 PM





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