I have a hyperlink column in a webgrid, and I'm changing the targeturl property of the cell in the InitializeRow event, but I'l like the hyperlink to open a new window (e.g. hl.target="_blank") but I can't find a way to do this as there is no "target" attribute of a cell.
Any ideas guys?
Thanks,
Richard
use this property in the InitializeRow event
.Text = "<a href='www.yahoo.com' target='_blank'>dd</a>";
Thanks charuk, I'll give it a go.
Hello Richard,
I have a similar problem but I would like to know when you click on the hyperlink column, does your hyperlink opens up a new parent page or does it open up a popup window or modal? Mine is that I want it to open up a popup/modal. Please let me know!
Thanks!
You will need to use javascript to open the window if you want it to open a modal window.
Hi Richard and Helen,
Thanks very much for your replies. I have figured it out. All I needed to do was call the OnLoad method from the asp:LinkButton then it register and initialize my modal (javascript code) when the page first loads up.
HS2