Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 4th, 2008, 08:53 AM
Authorized User
 
Join Date: Dec 2005
Location: , Colorado, USA.
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rdove84
Default Use LinkButton to pull record from DataList

I have a DataList that is populated with a selection of records from a SQL server database. Inside each template I have a LinkButton called Update that is meant to extract the ticket number of the entry and then populate another panel with data using that number. I thought I was extracting the correct data using the following two lines of code (below); however, I discovered that this code pulls the ticket number from the first DataList item and not from the Item in which the update button was clicked. Could someone tell me how to retrieve the number from the specific row in which the update button is clicked?

Context.Items["ticketNo"] = ((Label)CdsDataList.Items[0].FindControl("ticketNoLabel")).Text;
string ticketLabel = Context.Items["ticketNo"].ToString();


Thanks in advance.
 


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
Calling a method from Linkbutton in DataList swifty_programmer ASP.NET 2.0 Basics 1 July 28th, 2007 05:32 AM
Pull up or Create Record on Calendar Click Maverick10gk Pro VB Databases 10 April 26th, 2007 02:23 PM
linkbutton Beulah VS.NET 2002/2003 3 October 10th, 2005 05:00 PM
Pull or Push? sureshvb Crystal Reports 0 August 23rd, 2004 01:13 AM
Pull info from 2 tables stacy Classic ASP Databases 6 March 19th, 2004 10:46 AM



All times are GMT -4. The time now is 05:35 PM.


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