R
Ranginald
Hi,
I have a repeater based on a stored procedure. It pulls the following:
catDesc Image
The user sees the category description (catDesc) , and then clicks on
the image (Image) which is bound to the catID. This catID (@catID ---
an integer) is then to be passed to the next page, sculpture2.aspx for
use in a datagrid with a stored procedure.
I understand how to pass a parameter using response.redirect. I've
done so with a dropdownlist in the past by using OnSelectedIndexChanged
and just using dropdownlist.selecteditem.value as the parameter (an
integer in this case) which I use with response.redirect.
Is there an equivalent techinque for using a repeater?
Here is my code:
<asp:repeater runat="server" ID=repeaterOdd>
<itemtemplate>
<p align="left"><%#DataBinder.Eval(Container.DataItem,
"catDesc") %></p>
<p align="left">
<a href="sculpture2.aspx?catDesc=<%#DataBinder.Eval(Container.DataItem,
"catID")%>"
<img src="<%# DataBinder.Eval(Container.DataItem, "image") %>"></p>
</itemtemplate>
</asp:repeater>
If I pass this parameter as CatID, then I can't retrieve it using a
querysting, and the whole goal is to use a querystring to pass the
parameter. (e.g int passedValue = Request.Querystring["catID"].
Is there some way to pull the selected value of catID out of the
repeater, put it in some kind of variable, and then run a method to
attach it to a response.redirect?
Is there another way to do this? Using a LinkButton?
Thanks in advance.
I have a repeater based on a stored procedure. It pulls the following:
catDesc Image
The user sees the category description (catDesc) , and then clicks on
the image (Image) which is bound to the catID. This catID (@catID ---
an integer) is then to be passed to the next page, sculpture2.aspx for
use in a datagrid with a stored procedure.
I understand how to pass a parameter using response.redirect. I've
done so with a dropdownlist in the past by using OnSelectedIndexChanged
and just using dropdownlist.selecteditem.value as the parameter (an
integer in this case) which I use with response.redirect.
Is there an equivalent techinque for using a repeater?
Here is my code:
<asp:repeater runat="server" ID=repeaterOdd>
<itemtemplate>
<p align="left"><%#DataBinder.Eval(Container.DataItem,
"catDesc") %></p>
<p align="left">
<a href="sculpture2.aspx?catDesc=<%#DataBinder.Eval(Container.DataItem,
"catID")%>"
<img src="<%# DataBinder.Eval(Container.DataItem, "image") %>"></p>
</itemtemplate>
</asp:repeater>
If I pass this parameter as CatID, then I can't retrieve it using a
querysting, and the whole goal is to use a querystring to pass the
parameter. (e.g int passedValue = Request.Querystring["catID"].
Is there some way to pull the selected value of catID out of the
repeater, put it in some kind of variable, and then run a method to
attach it to a response.redirect?
Is there another way to do this? Using a LinkButton?
Thanks in advance.