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 June 5th, 2007, 08:40 PM
Registered User
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQLDataSource and SPROCS

I'm a bit stuck with what I'm trying to do. I want to respond to a user's selection in a gridview by taking the selected value and passing it as a parameter to a stored procedure which will return a value.

To be more precise: the gridview contains a list of names. When the user clicks on a name, I want to pass that name to a stored procedure that will return the filename of a .JPG with that person's picture, so that I can display the picture of the person he just selected. (There are thousands of images, so the database query determines the filename of the image I need.)

The sqlDataSource interface doesn't seem to give me the freedom I need to pass in the parameter. I need to know how to write server-side code that will

    * grab the selected name, from grid1.SelectedRow.Cells(3).Text,

    * send it to the stored procedure, where name is the sole input parameter,

    * retrieve the result (filename as string) which is the sole output parameter,

    * and display the image on some control (e.g. img1.src="myPic.JPG")

Please help! (and Thanks in advance) :)

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQLDatasource cymerman ASP.NET 1.0 and 1.1 Basics 1 February 28th, 2008 12:38 AM
sqldatasource imjayakumar Crystal Reports 0 May 19th, 2007 03:12 AM
sqldatasource imjayakumar ASP.NET 2.0 Professional 0 May 19th, 2007 02:58 AM
SQLDataSource bmains ASP.NET 2.0 Basics 1 December 19th, 2004 09:12 AM
Crucial - need help with ras + asp + mssql sprocs cr_ras_zke Crystal Reports 0 October 18th, 2003 08:02 PM

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