Thank you for your reply. I'm still wrestling with this. Let me give some
more background.
I tried two things based on your suggestion:
1) I created a label on the form. On the Page Load event, I set the text of
the label to this:
lblEventHistoryLink.Text = "<a href='EventHistory.aspx?TeenID=" &
Request.Item("SubjectID") & "&EventCode=" & Request.Item("EventCode") & "'
target='_blank'>View Event History</a>"
This sort of worked, except that I need to use Javascript's window.open
method so that I can set the new window's size, menubars, etc.
2) Second thing I tried -- On my original hyperlink, which is an ASP Web
control, I set the Target to "_blank" in the Properties window. When I run
it and click the link, I get two new windows:
- The first is a blank page that has the text "[object]" in it. The
address bar says:
javascript
:window.open('EventHistory.aspx?TeenID=1 23&EventCode=10')
- The second window is the page that I actually want.
Is there any way to get rid of this intermediate "[object]" window?
Any other ideas I can try?
Thanks.
"Steve C. Orr [MVP, MCSD]" wrote:
Output a standard HTML anchor tag with the Target attribute specified.
<a href="EventHistory.aspx" target='_blank'>click me</a>
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:8C**********************************@microsof t.com... Hello,
I have a link on an aspx page. The URL is set in the Page Load event:
lnkEventHistory.NavigateUrl =
"javascript:window.open('EventHistory.aspx?TeenID= " & _
Request.Item("SubjectID") & "&EventCode=" &
Request.Item("EventCode") & "')"
When I click the link, the new window opens as expected. The problem is
that on the original page containing the link, everything disappears and
is
replaced with just this:
[object]
Can anyone tell me why this is happening and how I can keep the original
page intact while popping up the new window?
Thanks very much.