> You haven't closed your iframe opener tag.
>
[quoted text clipped - 64 lines]
>
> - Show quoted text -
> On Jun 3, 4:08 am, "David"
>
[quoted text clipped - 83 lines]
>
> - Show quoted text -
I've narrowed this down to my lack of understanding of how to return a
value from the function - I've only a VB6 background.
The following code demonstrates what I am trying to achieve. The fact
that hyp1 doesn't work means that NavigateUrl="<%# GetUrl()%>" is not
doing what I want it to do.
Please could someone tell me the obvious error? Much appreciated.
Cheers,
Phil
<%-- these dont work--%>
<iframe
src="<%# GetUrl()%>"
runat=server
frameborder=yes
name = "myframe"
width="200"
height="200">
</iframe>
<BR />
<asp:HyperLink
ID="hyp1"
runat="server"
Width="450px"
Target="myframe"
NavigateUrl="<%# GetUrl()%>"
>
Click here to fill the frame
</asp:HyperLink>
<br />
<%--this works --%>
<asp:HyperLink
ID="hyp2"
runat="server"
Width="450px"
Target="myframe"
NavigateUrl="HTTP://WWW.GOOGLE.COM"
>
Click here to fill the frame
</asp:HyperLink><br />
code behind...
Function GetUrl() As String
Return "http://www.google.com"
End Function
David - 03 Jun 2007 10:44 GMT
Perhaps someone can explain the difference of <%# and <%= to me (I am not
sure, but I thought that <%# was a databound value)
If it is databound, you might try in your page load, page.databind()
alternatively, try the <%=

Signature
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
>> On Jun 3, 4:08 am, "David"
>>
[quoted text clipped - 143 lines]
> Return "http://www.google.com"
> End Function
David - 03 Jun 2007 10:55 GMT
Actually, I think I have just worked it out...
<iframe
src="<%# GetUrl()%>"
runat=server
frameborder=yes
name = "myframe"
width="200"
height="200">
</iframe>
Give your iframe an ID (YourIFrameID here for demo)
Reference the iframe in your codebehind...
proected System.Web.HtmlControls.iframe YourIFrameID; // I might have got
the syntax slightly wrong.
Then in your event, i.e. Page_Load
YourFrameID.src = "http://www.google.com"; // Quotes around URL may get
lost in translation...
Remove the src attribute completely from your iframe.

Signature
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
>> On Jun 3, 4:08 am, "David"
>>
[quoted text clipped - 143 lines]
> Return "http://www.google.com"
> End Function