Alter control property according to datarow value
Posted on 2004-08-04
Hi all, bear with me as I havent meddled with asp.net for a while.
I have a simple datagrid displaying information. One of the columns is a hyperlink control. The link can sometimes be a movie clip and sometimes a jpeg.
When it is a movie clip, its fine, you click the link and your media player opens up no problems.
However, when it is a jpeg and u click link, the jpeg loads in the current page (which i do not want).
Now, if i put target=_blank in the control, then... when u click a movie clip link, a blank page is opened as well as the media player.
What I would like to do is (if possible), alter the controls "target" property depending on the type of link.
In windows forms, I would be using the datarow to iterate thru the rows to modify or read them. I am using ASP.NET.
I'd be grateful if someone could give me a hand with this or would appreciate advise on other methods.