Hyperlink size

Hello Experts,

I dynamically designing hyperlinks for my calendar control as follows:

  Dim hyperLink As System.Web.UI.WebControls.HyperLink
                hyperLink = New System.Web.UI.WebControls.HyperLink
                With hyperLink
                    .ID = "myNewHyperLink"
                    .Text = "<BR>" + xlrow.Item(0) + "- All Day"
                    .NavigateUrl = "BookingPage.aspx?id=" & xlrow.Item(8)
                End With
                e.Cell.Controls.Add(hyperLink)



Can anyone tell me pls how to do set the width and height of the new web page.

Cheers
radhakrishanAsked:
Who is Participating?
 
svyCommented:
.NavigateUrl = "javascript:window.open('BookingPage.aspx?id=" & xlrow.Item(8) & "','newBookingPage', 'width=500,height=400');void(0);";
0
 
svyCommented:
Well you can either have this in BookingPage.aspx:
<body onload="window.resizeTo(width, height)">
Or
.NavigateUrl = "window.open('BookingPage.aspx?id=" & xlrow.Item(8) & "','newBookingPage', 'width=500,height=400');";
0
 
radhakrishanAuthor Commented:
Hi,

.NavigateUrl = "window.open('BookingPage.aspx?id=" & xlrow.Item(8) & "','newBookingPage', 'width=500,height=400');";


Doing this throws an exception error...

what very strange happening is when i click on those hyperlinks it directing the page rather then opening a new page, can u pls tell me how shall i make it open in a
new window and not the current window....

with the peice of code i wrote above.

thnx
0
 
radhakrishanAuthor Commented:
Hi Svy,

Havin tested the answer you gave it actually opens two windows instead of just one....

Any reasons why?
0
 
radhakrishanAuthor Commented:
Sorted out the problem..

cheers
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.