473,399 Members | 4,177 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,399 software developers and data experts.

Change from a Page to an I frame

I have an iFrame declaired like that::
Expand|Select|Wrap|Line Numbers
  1. <iframe id="iFrame" runat="server"  class="tablecolumndiv" ></strong>
I put the two lines:
Expand|Select|Wrap|Line Numbers
  1. Protected WithEvents iFrame As System.Web.UI.HtmlControls.HtmlGenericControl<br/>
  2.     Public frame1 As HtmlControl = CType(Me.FindControl("iFrame"), HtmlControl)
  3.  
In my code behind.
But when I come to the:
Expand|Select|Wrap|Line Numbers
  1. frame1.Attributes("src") = "/Pages/Support/Asp/Help01.aspx"
It throws me an error of :
Object reference not set to an instance of an object.
Because the
Expand|Select|Wrap|Line Numbers
  1. Me.FindControl("iFrame")
has a value of nothing
That error eliminates when I delete the `runat` from the element.
Why?
Jan 24 '14 #1
0 893

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Zalek Bloom | last post by:
Hello, I built some Web site that includes 3 frames page. After a user sign-off I want to redirect him/her to a single frame page. When I use Response.Redirect command, I am getting the...
1
by: Mad Scientist Jr | last post by:
I am getting an error in my code that references a textbox inside the current row of my datagrid, whenever I try changing the page (paging is enabled). This code doesn't even run unless a button in...
2
by: RWD | last post by:
I am trying to figure out how to change the target frame in my hyperlink on a DHTML menu. The menu is in one frame and the target frame is called "main" The code is below: Thanks in advance...
0
by: VB Programmer | last post by:
I have 2 webforms. When I print out the page.Controls(1).tostring variable one says "HtmlForm", the other "HtmlGenericControl". How can I change the first one to "HtmlForm"? ?...
0
by: ABC | last post by:
How to make change one frame size (width) when I clicked a button on anothoer frame?
0
by: joe | last post by:
how to change page-level charset to big5
2
by: satnamsarai | last post by:
it is possible to change page orientation to landscape from asp.net page? I am using window.print() dialog to print a page and I would like that page to print automatically in landscape view.
2
by: gm04030276 | last post by:
Hey all, Im trying to create a thing that will essentially allow me to use tabbed browsing within a website using php sessions to store the different opened pages. To do this, im using two frames,...
2
by: jkdudhatra | last post by:
How To Change Page Orientation Of Default Printer In Visual Basic At Run Time ?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.