Friday, 13 September 2013

What HyperLink has been clicked in c# asp.net?

What HyperLink has been clicked in c# asp.net?

I am making an asp.net web application which has to play videos. In my
start page I have a hyperlink for each video. All the hyperlinks are
identical, except their names. This Means they all link to the same page.
Im interrested in knowing wether there is an option to know which
hyperlink was clicked. I would like to retrieve the name of the hyperlink.
My code for generating the hyperlinks looks as follows:
foreach (FileInfo i in corFiles)
{
HyperLink t = new HyperLink();
t.Text = i.Name;
t.NavigateUrl = "page.aspx";
CorrectArray.Add(t);
}
return CorrectArray;
The text of the hyperlink is Unique to a video, which Means I can change
the src destination of the video to play based on the text name. So the
question goes as follows. Are there any way of retrieving the text name of
the hyperlink when it is clicked by the user?
I hope you can help! Thanks in advance.
Regards Magnus

No comments:

Post a Comment