Web Form Fails To Load in VS.NET w/ sample code

I have a BasePage class and a StandardPage class.

The BasePage inherits from the System.Web.UI.Page object, and then the StandardPage inherits from BasePage.

The BasePage has some Properties that access the Request object.
Now I have an 'index.aspx' page with no codebehind and inherits the 'StandardPage' object through the PageDirective tags. When I try to view the 'index.aspx' in the designer, it breaks saying "accessor fails... Request has no instance' (Something like that)
Anyway when I comment out the Request object, the page loads in the designer perfectly. During runtime the page loads perfectly too...the problem only comes during design time.
Sample code can be found @
This guy has the exact same problem.

1/13/2005 1:46:06 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

4 Replies

Similar Articles

[PageSpeed] 2

Are you saying that you do not want a code behind? You want to use inline code instead?
If so, what does your @Page directive look like?

Jamie Kindred, CGA, MCSD
1/13/2005 2:25:58 PM
No inline code in aspx files.

I dont want to tie an aspx file to a codebehind.
The aspx file will chose who it wants to inherit from. This way I can have multiple views for one Page model object (MVC).
Page tags will look like ...
<%@ Page Language="vb" AutoEventWireup="false" Inherits="Web.StandardPage"%>

By the way, the problem I stated is resolved in "VS.Net 2003".
Just post-back if you still want to continue the topic and my purpose with the Page-Directive.

1/13/2005 4:09:44 PM
Good news.

I understand what you are doing, I wasn't sure why it wasn't working in the designer. So you're saying this is an issue with v2002?
Jamie Kindred, CGA, MCSD
1/13/2005 7:59:34 PM

I ran the same code and aspx file in vs2003...and it loaded fine.
In 2002 the Property in the Base Class are accessed, and for some reason the HTTPCONTEXT is Nothing. So all those Page/Response/Request calls crash when they are in Properties.
So the other solution to this is checking with 'if HttpContext is nothing' . This is a hacky solution, but it works if you dont want to use 2003.
1/13/2005 8:46:39 PM

Similar Artilces:

Implementing .Net Form into an APS.net web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an ASP.net web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

Web Form vs. Web Content Form
If you don't mind, I would like to know what is the difference between those two items, when I go to add a new item I see both of those and I don't know what the difference is.  A content form is for use with a masterpage. A web form is a standalone web page. If you select web content form, you will then have to specify a masterpage for it. and what is a master page used for?  Hi, a master page is used to give a constant look and theme to a site, without having to duplicate code. So basically you can put your header, menu, nav and footer on a master page. Then a...

windows forms in vb .net into web forms
we are creating a database driven website as part of our project. currently we have forms connecting to the database created in visual basic. these windows forms we need to convert into web forms which are asp .net compatible. can u give me an answer or show me a way. Hi, because of the difference in nature between web and win applications you'll need to reimplement at least the UI part. If you have a multitiered application in which the busines logic and data access are in different parts/assemblies you can reuse them. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Wor...

.Net Web Form & Web Service Deployment
Hi all I have written some test web services and some web form applications and deployed them to my IIS. That's fine but I now want to deploy them to my real IIS server. I have created an msi for each but the problem is I seem to only be able to deploy to the default web site. Our default web site is turned off and instead we use several other sites. Does anybody happen to if Powerbuilder 11 supports non default web sites? If not do I need to hack the msi and if so can anybody suggest a suitable tool. I have Orca but it's not very friendly. Unless of course I knew exactly w...

How to Make Web Forms from other Web Forms
In putting together an ASP.NET application for a biz application, we have come to the point where there are three different types of basic forms which have, for the most part, been perfected. Now its is a matter of cloning those forms for various uses and modifying or adding code to suit the particular need. Copy and paste works OK, but there is a lot of changing of certain words, etc. Is there a way in ASP.NET to take these basic forms, turn them into classes or templates, create forms from them, then add or overwrite code? ? (Anybody who is a Vis Fox Pro programmer would know imme...

Web forms and mobile web forms
Hey everyone, I am looking to develope a web site that depending on the device connecting to it, it will display a certain page. In this case im looking to create a web and wap version of the same project. I have the Web forms version finished using ASP.NET and C# and I am wondering how to create the mobile web form and incorporate it in the project. In the project folder, can I just add a mobile web??? But what about displaying device specific pages?? Cheers -Dudach Yes, you can add mobile web forms and controls to your Web Application project. No problem. For device/br...

DataWindow Failed to Retrieve in .NET Web Form
I am running PB 11.5.1 Build 4788. I have a datawindow that would retrieve normally under client server mode, but do not retrieve under .NET Web Forms (returns nothings). I am running the same source code in both modes. The retrieval arguments of the said DataWindow are (Date, Time, Integer). The code is as follow: This.DataObject = 'dw_actsch_sch' This.SetTransObject( sqlca ) li_RtnVal = This.Retrieve( Date( '2010-09-10' ), Time( '10:00.00' ), 1 ) The li_RtnVal is -1 when it is running in web form. I am wondering if anyone has similar experiences,...

How to Create Framed Web Forms in VS.NET?
Hi, I'm using Visual Studio.Net to create my web applications. In design view of a web form on the menubar there is a "Frames" option, but its contents are always disabled. I'm assuming that this option is there to let you create framed pages, right? Why is this option always disabled? Is it a setting in VS.NET that needs to be changed to enable them? How do you create framed pages in this environment? Is writing actual HTML the only way to do this? Any help is much appreciated. Thanks, Shawnsa4720k These options are only available to a Frameset page. You can add ...

VS.NET Web Data Form Wizard
New to asp.net and using the Web Data Form Wizard. Cannot get the datagrid sort or paging functions to work. Do I need to add code for this manually? When selected both options just reload the main page. Thanks, SCott Check out the following two MSDN articles: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconintroductiontodatagridwebcontrol.asp and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskaddingsortingtodatagridwebcontrol.asp bill "This posting is provided "AS IS" wi...

how to change these windows form code to web form code?
hi, i'm a beginner of c#,i want to know how to change these windows form code to web form code //////////// private void buttonSign_Click( object sender, System.EventArgs e) { //get original message as byte array byte[] messagebytes = Encoding.UTF8.GetBytes( textOriginalMessage.Text); //create digest of original message using SHA1 SHA1 sha1 = new SHA1CryptoServiceProvider(); byte[] hashbytes = sha1.ComputeHash(messagebytes); //display hash bytes in hex format StringBuilder sb = new StringBuilder(); for (...

For interrupting.web form Resized by position of the div : if div can't dispaly all (such as only top part , then web form heithten the heght),resize the web form
Web Form Resized by position of the div : if div can't dispaly all (such as only top part , then web form heithten the heght),resize the web form ! Because of my pool English, if you can't see , I will explain more ! ThanksGambler is the real life I guess you mean when form grows it also grow parent div element. This is normal. If you want div to stay fixed size and rather clip the form and maybe show a scrollbar, look at overflow property in CSS.Thanks------------------------------------------------------------This posting is provided "AS IS" with no warranties, and confers no ...

Include web form inside web form
I tried to include an aspx file in a asp.net web form. However, all the web controls (textbox, button) in the included page are not displayed when called. <Form id="Form1" method="post" runat="server"> <%   Response.writeFile("subPage.aspx"); %> <asp:button id="btnPrev" runat="server" text="Previous"></asp:button> </Form> There are some <asp:textbox> controls in the subPage.aspx file, the file itself works fine, but when it is included in the main page, all the controls are not displayed. Please assist. Thanks   u should u...

How to fire events in other web form from other web form ?
Suppose that I have A and B web form. I want to trigger B web form's Page_Load event from A web form. How can I do that ? Thanks in advanced WilbertWilbert Bujn Create a public method in B that call the load method : public void Load(object sender, System.EventArgs e) { Page_Load(sender, e) ; } In the page_load of A, instanciate a B object and then call the function B myB = new B() ; myB.Load() ; Quicky Thank you quicky, it works fine. WilbertWilbert Bujn...

Web Form embedded in another Web Form
Hi,  I have programmed a Web Form which acts like a scientific calculator. I would like to embedd this calculator in the upper left hand corner of another accounting Web Form. I don't want to host the calculator on the same server as the accounting page. I.e. I want them to have distinct URLs. Classically, I would do this using frames, but is there a better way using ASP? Is there some sort of Panel which can display the webpage at a specific URL which I can just drag onto my accounting Web Form? Thanks,  P1000   Frames are the only way to embed a webform inside ano...

Web resources about - Web Form Fails To Load in VS.NET w/ sample code - asp.net.web-forms

Sample return mission - Wikipedia, the free encyclopedia
A sample return mission is a spacecraft mission with the goal of collecting and returning with tangible samples from an extraterrestrial location ...

Facebook Gives Developers Easier Access To Sample Apps
Facebook took steps to make its sample applications more readily accessible by developers , creating a new Samples and How Tos page , as well ...

Samples & How-Tos - Facebook-Entwickler
All sample apps can we downloaded from https://github.com/fbsamples. Social Plugins winefriends...

Splenda uses Facebook to Dole Out 16,000 Samples of New Splenda Mist
In a break from traditional product sampling, sweetener brand Splenda is sending Facebook fans samples of its new Splenda Mist product to test ...

Mark Sample (@samplereality) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Sample Lab for iPad on the iTunes App Store
Get Sample Lab on the App Store. See screenshots and ratings, and read customer reviews.

Samsung Infuse 4G Samples - a set on Flickr
Sets let you organize your photos on Flickr. Explore the 15 photos in this set.

GlobalFoundries and AMD Announce First 14nm FinFET Sample Production Success
... and in some well-needed good news for the company, today they and AMD are announcing that they have successfully fabbed AMD’s first 14nm sample ...

Shop the Madeline Weinrib Sample Sale This Weekend — Design News
Pin it Attention, New Yorkers! Madeline Weinrib is having a sample sale this weekend at ABC Carpet + Home, where a whole host of rugs, accessories, ...

New in Android Samples: Authenticating to remote servers using the Fingerprint API
... announced in the previous blog post , Android 6.0 Marshmallow is now publicly available to users. Along the way, we’ve been updating our samples ...

Resources last updated: 12/13/2015 10:09:01 AM