Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 July 14th, 2003, 11:06 AM
Authorized User
 
Join Date: Jun 2003
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default linkbutton and postback

Hi,

I have posted this question in other forums and received only limited feedback.

I have a page with two datalists, call them unassigned and assigned. The items/values for each list come from a SQL table HardwareItems, and the difference between where an item is listed is determined by a Bit Column titled assigned.

The items in the Unassigned list are linkbuttons, so that clicking on an item will populate the 'assigned' Bit column and move the item from the unassigned list to the assigned list. My problem is that autopostback is not available for the linkbutton, so I am currently redirecting to the same page in order to force the datalists to update.

To complicate matters, I have three options for generating the Unasigned list: hardware items by type, hardware items by serial# search, or all hardware items - each having their own button and event which repopulate the same Unassigned datalist. The problem is that by redirecting I wipe out the user's search criteria which generated the Unassigned list, so the user must redo their search before they can pick another item to assign.

I'm not a Java guy - is there an easier way to force these lists to refresh without reloading my whole page and preserving which search method the user used to populate the Unassigned datalist, so that when the list is refreshed the same criteria is used to find the unassigned items?

Thank you,

John
 
Old July 14th, 2003, 06:37 PM
Authorized User
 
Join Date: Jun 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, John:

We had the similar problem before. The solution - may not be the best - is, in order to avoid having a round trip to your database and loosing your client-side user input, you may want to retrieve all the data you need from the database into an array, and program on the client-side according to the user input. As for your user input, you have to do some client-side programming somehow to keep them on the page before the user finally submits the data to the server.

Hope it helps.





Similar Threads
Thread Thread Starter Forum Replies Last Post
LinkButton PostBack handler in custom control Ozzy Bongo BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 0 July 24th, 2008 07:55 AM
Linkbutton array yukijocelyn ASP.NET 2.0 Basics 4 September 7th, 2007 02:06 AM
linkbutton control jake ASP.NET 1.0 and 1.1 Basics 1 December 6th, 2005 02:30 PM
linkbutton Beulah VS.NET 2002/2003 3 October 10th, 2005 05:00 PM
linkbutton and postback jtyson ASP.NET 1.x and 2.0 Application Design 0 July 10th, 2003 12:17 PM





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