PC Review


Reply
Thread Tools Rate Thread

How to change which htm file is displaied in a tablecell

 
 
AAaron123
Guest
Posts: n/a
 
      7th Aug 2008
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??









 
Reply With Quote
 
 
 
 
AAaron123
Guest
Posts: n/a
 
      7th Aug 2008
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??
>
>
>
>
>
>
>
>
>



 
Reply With Quote
 
AAaron123
Guest
Posts: n/a
 
      7th Aug 2008
iframe must have
runat="server"

runs ok now!

"AAaron123" <(E-Mail Removed)> wrote in message
news:eMnA0CD%(E-Mail Removed)...
> 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??
>>
>>
>>
>>
>>
>>
>>
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Documents are not opened and displaied correctly =?Utf-8?B?dHNk?= Microsoft Word Document Management 6 19th Feb 2006 10:36 PM
How to change backcolor in the new tablecell? Vadim Microsoft ASP .NET 1 24th Feb 2005 03:07 PM
TableCell oTableCell = new TableCell(); noWrap? Brian K. Williams Microsoft ASP .NET 2 30th Apr 2004 01:04 AM
Re: hover buttons not displaied E. T. Culling Microsoft Frontpage 0 7th Aug 2003 03:17 PM
Re: hover buttons not displaied Tom Pepper Willett Microsoft Frontpage 1 7th Aug 2003 02:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:32 AM.