I've modified the Albums table by adding some additional columns for data I want to store that will allow me to display different "types" of albums.For example, let's say I have a Type column in Albums whose values can be Cat, Dog, or Other.
I plan on changing the menu so instead of just one Photo link to photoalbum_list.aspx, I have several links, each returning a specific “type” of album.I think I will need to use QueryStringParameters for this, so an example URL would look like ~\photoalbum_list.aspx?type=DogIn this example, I want the page to just display albums for Dogs.
As an added bonus, I would like to add changes so that if a URL was entered without a parameter (i.e. without type=<somevalue>), the user would be redirected to a different
page or something would display telling them they can’t do that.Basically, I don’t want someone to be able to return all albums.
I’ve never done this before, so I am wondering what needs to change to support returning albums of a given "type"?Do I just need to change the PagedAlbumList stored proc?AlbumList stored proc?
What would I do different, if anything, if I wanted to support multiple parameters?(ex.Type and Status)?
If anyone has suggestions for the bonus feature of not letting someone return all albums, that would be cool too.
I know what I want, I’m just not sure how to get there yet as I’m just learningJ
Any advice, tips, links, samples, etc.would be greatly appreciated.
glura
Member
122 Points
44 Posts
How can I return only a select group of albums?
Nov 10, 2006 03:30 PM|LINK
I've modified the Albums table by adding some additional columns for data I want to store that will allow me to display different "types" of albums. For example, let's say I have a Type column in Albums whose values can be Cat, Dog, or Other.
I plan on changing the menu so instead of just one Photo link to photoalbum_list.aspx, I have several links, each returning a specific “type” of album. I think I will need to use QueryStringParameters for this, so an example URL would look like ~\photoalbum_list.aspx?type=Dog In this example, I want the page to just display albums for Dogs.
As an added bonus, I would like to add changes so that if a URL was entered without a parameter (i.e. without type=<somevalue>), the user would be redirected to a different page or something would display telling them they can’t do that. Basically, I don’t want someone to be able to return all albums.
I’ve never done this before, so I am wondering what needs to change to support returning albums of a given "type"? Do I just need to change the PagedAlbumList stored proc? AlbumList stored proc?
What would I do different, if anything, if I wanted to support multiple parameters? (ex. Type and Status)?
If anyone has suggestions for the bonus feature of not letting someone return all albums, that would be cool too.
I know what I want, I’m just not sure how to get there yet as I’m just learningJ
Any advice, tips, links, samples, etc. would be greatly appreciated.
Thanks,
Gary