Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics 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 August 31st, 2006, 12:25 PM
Registered User
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Datalist with Child Button

Hi Everyone,

I am writing the code for an online library and having some trouble setting up the functionality of the the button used to signout a resource. I think that I want to take the primary key of the item in the data list, then assign differnt values to the fields relating to the status of this resource but I am not sure the best way to go about doing this.

Below is what I have thus far:

Private Sub SearchResults_ItemCommandByVal source As Object, ByVal e As DataListCommandEventArgs) Handles SearchResults.ItemCommand
Dim SQL As String
Dim primaryKey As Integer
primaryKey = CInt(e.CommandArgument)

If e.CommandName = "SignOut" Then
     SQL = "SELECT [IsAvailable] FROM [dbo_Activity] WHERE [ResourceID] =" & primaryKey
        
End If
End Sub

Any help would be greatly appreciated, Thanks.

Mike
"It Seems All My Problems Exist Between Keyboard And Chair."
 
Old August 31st, 2006, 12:33 PM
Registered User
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Obviously didn't check my post over enough times.

I know I need to check the value of [dbo_Activity].[IsAvailable] before the user is able to signout an item - my question there is how to take the value returned from the SQL I have and assign it to a variable that I can do a check on.

The other, and more critical question(s) is in regards to the necessary steps to take AFTER the resource has been checked for availablity.

Thanks Again Everyone.



Mike
"It Seems All My Problems Exist Between Keyboard And Chair."





Similar Threads
Thread Thread Starter Forum Replies Last Post
Datalist inside datalist amit.jagtap ASP.NET 2.0 Professional 1 September 4th, 2007 05:03 AM
Opening MDI Child on Button Click of MDI Child Sachin Shinde Visual Studio 2005 0 June 8th, 2006 05:05 AM
Make a image button as default submit button toshi ASP.NET 1.0 and 1.1 Basics 1 June 1st, 2006 05:25 AM
how to use 'Enter' button to trigger a button, thx raybristol ASP.NET 1.0 and 1.1 Basics 1 December 16th, 2005 06:56 AM
Button acts depending on radio button values janise Access 4 March 10th, 2004 12:53 AM





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