473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How to change which htm file is displaied in a tablecell

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??



Aug 7 '08 #1
2 1402
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" <aa*******@roadrunner.comwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
>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??



Aug 7 '08 #2
iframe must have
runat="server"

runs ok now!

"AAaron123" <aa*******@roadrunner.comwrote in message
news:eM****************@TK2MSFTNGP04.phx.gbl...
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" <aa*******@roadrunner.comwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
>>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??




Aug 7 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: harry | last post by:
I want to be able to change the text alignment within a table cell between "right" & "center" depending on how many rows are in the table. Is this possible in Javascript? - can't see how to do...
0
by: Randy | last post by:
Hello All, Is there any way to make this happen... Say I want to make a table with 3 rows. The first row has two TableCells each with a width of 300. The second row has one TableCell with the...
4
by: Serdar Kalaycý | last post by:
I create a TableCell by TableCell cell = new TableCell() but I could not find how to add a TextBox inside this cell. Any ideas? Thanks in advance Serdar KALAYCI --
2
by: George Durzi | last post by:
Consider this pseudo HTML from a web form <asp:Table> <asp:TableRow> <asp:TableCell> <asp:Table> <asp:TableRow> <asp:TableCell></asp:TableCell> <asp:TableCell></asp:TableCell>...
6
by: hb | last post by:
Hi, I have a page bill.aspx and its code-behind bill.aspx.cs. On bill.aspx I have: === Select a month: <asp:dropdownlist runat="server" id="lstDate" autopostback="True" /> <br> <asp:table...
16
by: Giggle Girl | last post by:
Hi there, I have a nav tree similar to the XP Windows Explorer in behavior. It uses styles to underline a row on mouseover, and change the look of a row when clicked. Currently, it is working...
3
by: John Smith | last post by:
I'm looking into this peace of code: protected void DropDown_SelectedIndexChanged(object sender, EventArgs e) { DropDownList list = (DropDownList)sender; TableCell cell = list.Parent as...
2
by: John Smith | last post by:
Will this line of the code: item.Cells.Text = "Some text..."; change only DataGrid visual value or it will also change value in the DataSource? How can I change value in DataSource? ...
0
by: DanG | last post by:
During grid field validation, I would like to generate a message for the user to tell which column had the error. So I have a control (textbox, dropdownlist, checkbox, etc.), and would like to...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.