Hi,
I'm using the rad rotator for displaying the latest 10 images by using their names from database, where the images are in a folder.
the code for above procedure is below
when a client clicks on the rotator item (image) it is redirecting to the new page, code for this is below
now, in redirected page i wrote sentence as
how can i get the name of image(clicked item) by using the above rotating item index
I'm using the rad rotator for displaying the latest 10 images by using their names from database, where the images are in a folder.
the code for above procedure is below
<
telerik:RadRotator
ID
=
"RadRotator1"
runat
=
"server"
Height
=
"120px"
Width
=
"680px"
ScrollDuration
=
"500"
ScrollDirection
=
"Right"
FrameDuration
=
"1500"
ItemWidth
=
"120px"
ItemHeight
=
"100px"
RotatorType
=
"AutomaticAdvance"
DataSourceID
=
"SqlDataSource1"
OnInit
=
"RadRotator1_Init"
>
<
ItemTemplate
>
<
asp:Image
ID
=
"image1"
runat
=
"server"
CssClass
=
"image"
ImageAlign
=
"left"
Visible
=
"true"
ImageUrl='<%# String.Format("~/upload data/movies/{0}", DataBinder.Eval(Container.DataItem, "imagename")) %>' />
</
ItemTemplate
>
</
telerik:RadRotator
>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:cinema mistakesConnectionString %>"
SelectCommand="SELECT TOP 10 [imagename] FROM [movie] ORDER BY [mid] DESC"></
asp:SqlDataSource
>
when a client clicks on the rotator item (image) it is redirecting to the new page, code for this is below
protected void RadRotator1_Init(object sender, EventArgs e)
{
RadRotator1.ItemClick += new RadRotatorEventHandler(RadRotator1_ItemClick);
}
void RadRotator1_ItemClick(object sender, RadRotatorEventArgs e)
{
Response.Redirect(string.Format("~/admin/postmistake.aspx",e.Item.Index));
}
now, in redirected page i wrote sentence as
string s = Context.Request.QueryString["id"];
how can i get the name of image(clicked item) by using the above rotating item index