Protected WithEvents frame1 As System.Web.UI.HtmlControls.HtmlGenericControl
Protected Sub RadioButton1_CheckedChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles RadioButton1.CheckedChanged
Dim frame1 As HtmlControl = CType(Me.FindControl("MissionSchedule"),
HtmlControl)
frame1.Attributes("src") = "Mission.htm"
End Sub
I found the above on the Internet.
Guess "Protected" does not set aside memory so the Dim is needed. Correct?
But Me.FindControl("MissionSchedule") returns Nothing even though:
<iframe id="MissionSchedule" src="Schedule.htm" ...
I'd appreciate any suggestions?
"AAaron123" <(E-Mail Removed)> wrote in message
news:%23w4fWrC%(E-Mail Removed)...
>I have a tablecell containing two radio buttons.
> I have two htm files.
> If one button is checked I'd like one of the file's contents to show.
> If the other button is checked I like the other file's contents to show.
>
> I found out about GroupName and AutoPostback so that works.
> In the code behind CheckedChanged events I wanted to read the files.
>
> Maybe use an iframe in the cell and set its src in the events. But it
> appears the event code does know about the iframe.
>
> Reading I came across using document.all.oFrame but that doesn't appear to
> work in the events.
>
> Can you point me to an approach?
>
> Thanks
>
> ps Is iframe treated as markup on the server and simply passed along??
>
>
>
>
>
>
>
>
>
|