473,811 Members | 3,687 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to add Page.header error out in vb.net?

121 New Member
Hello,
I am trying to add
Expand|Select|Wrap|Line Numbers
  1.   Page.Header.Controls.Add(New LiteralControl("<link href='../CSS/test.css' rel='stylesheet' type='text/css' />"))
  2.  
in vb code. Strangely the solution builds but when i run my code i get 'Object reference not set to an instance of an object.' error.

i have searched extensively on internet but couldn't see what's going wrong. Solution builds alright but it errors out while running on same line of code.

Any help will be appreciated

Regards
Jay
Feb 4 '11 #1
1 2089
jay123
121 New Member
Just figured out that Page.Header is Coming as 'Nothing'

Any Suggestion why this may be?

Regards
Jay
Feb 5 '11 #2

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

Similar topics

0
2179
by: V.Boomessh | last post by:
I am facing hte following in Crystal report for VS.NET, can any please help me out of this issue The structure of the report is as follows 0.Report Heade 1.Page Heade 2. Group Header
4
2817
by: Tony O'Hara | last post by:
Hi all, I've just found a piece of code in the Microsoft KB (311280) that supposedly lets me change the page setup, i.e. page header etc, via the registry. I simply cut and paste the code into my aspx page but unfortunately I am getting an error returned on the 'setvalue' line. 'Object reference not set to an instance of an object' what am I doing wrong?
2
11585
by: Anthony | last post by:
Our Database is having errors. We are currently using PostgreSQL to store 2.5 Million records per day. The average addition to our primary table is 4.5 Gigs of data. We are doing this on a dual Opteron 244 system with 1 TeraByte of HDD space. The drives are 250 Gig Western Digital. The Raid Controller is LSI Logic MegaRaid 150-6. We are getting an error after about 4-5 days worth of data being put into the system.
5
4167
by: Ed L. | last post by:
I have 5 corrupted page headers as evidenced by these errors: ERROR: Invalid page header in block 13947 of ... The corruption is causing numerous queries to abort. First option is to try to salvage data before attempt restore from backup. I want to try to edit the file to zero out the bogus headers. I realize there may be data lost from this attempt. I have scalpel (binary editor) in hand. Which bytes should I edit, and what do...
4
3103
by: Alan Silver | last post by:
Hello, I downloaded and registered VWD Express from the MS site, and this gave me a free download of a book called "Build A Web Site Now!", which is a (very light) introduction to VWD. In the chapter on master pages, it says that adding meta data to a page is done by... Master.Page.Header.MetaData.Add("keywords", "ferrets, gibbons");
0
1718
by: Arnold | last post by:
Hi Everyone; In a report, I've essentially recreated a paper sheet by adding various labels--name, date, problem, year, Progress Notes, etc.--and horizontal lines (people have traditionally written notes). I made all of these in the Page Header section. By the way, this is a report form to track the daily progress of students. --Report Header--none. --Grouping section--yes. The report form has a StudentID Header, which
1
2180
by: Hank | last post by:
My boss wants the font on reports to be user selectable on a Configuration screen. I open the Font Dialog and one is selected. When the report opens, I call a funtion that changes the font of all Text Boxes and Labels. I need to go through the collection of each section of the report: Report Header, Report Footer, Page Header, et cetera. I use this code: ' *******************************************************************************...
1
1873
by: Asif | last post by:
Hi All, I did follow the MSDN article (http://msdn2.microsoft.com/en-us/ library/ms379585(VS.80).aspx ) for overriding Master Page properties by setting page title and other Meta information( Keyword and Description) for individual content page by writing the following line on Page_Load event in content page Sub Page_Load()
3
4717
by: | last post by:
In my report I have a calculated field that counts the number of records of the underlying table, =Count(). This field is placed in the report's header. I'd like to repeat this value on every page but when I drag the field to the page header it shows 'error' when I run the report. Can someone explain why this isn't working? Any workarounds? Thank you. John
1
2763
by: michael | last post by:
I want to include a simple menu in a usercontrol on a page. The page inherits a BaseClass that overrides Render method, including header control. Header is dynamically generated. ...... writer.RenderBeginTag(HtmlTextWriterTag.Head) ....... If I want to use DynamicHoverStyle for the menu I am getting the error "Using Menu.DynamicHoverStyle requires Page.Header to be non-null".
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10395
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10130
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9204
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6887
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5553
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4338
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3017
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.