Avatar of DanGettel
DanGettel

asked on 

How to use PreviousPage value in SqlDataSource Select Parameters

I have am using a SqlDataSource for a Gridview on a page that I am working on.  

For my select statement I need to access a couple of values from the previous page (Cross-Page Postback).  

I assume that I will need to somehow specify this in my Select Parameters, but I am not sure how. I have search in mulitple places, but can't seem to find out how this is done.

Thanks in advance for the help.
.NET ProgrammingEditors IDEs

Avatar of undefined
Last Comment
jorge_toriz
Avatar of jorge_toriz
jorge_toriz
Flag of Mexico image

Catch the Selecting event of your sqlDataSource and set the values of your parameters
Avatar of DanGettel
DanGettel

ASKER

jorge,

maybe I am misunderstanding you, but the select event wouldn't help me here.  I am needing the previouspage values in order to create the gridview.
Avatar of jorge_toriz
jorge_toriz
Flag of Mexico image

Yes, in your selecting event you can use the PreviousPage to get the values you need for your sqlDataSource
ASKER CERTIFIED SOLUTION
Avatar of jorge_toriz
jorge_toriz
Flag of Mexico image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo