473,799 Members | 3,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Intellisense not working as expected with PreviousPage and Page Class

Is there something extra I need to do to make intellisense work when
referencing a page class? Here is my working Page_Load from a aspx page.
sourcePage does not get it's members listed with intellisense. It acts like
it is not a class but compiles fine.

Thanks,

protected void Page_Load(objec t sender, EventArgs e)
{
if (!IsPostBack)
{
if (Page.PreviousP age != null)
{
Default sourcePage = (Default)Previo usPage;
int selectedIndex = sourcePage.GetD ropDownListUnit sSelectedIndex( );
DropDownListUni ts.SelectedInde x = selectedIndex;
}
}

}

Peter Kellner
http://peterkellner.net
May 15 '06 #1
2 1734
Add the directive:

<%@ PreviousPageTyp e VirtualPath="~/FirstPage.aspx" %>

-Brock
http://staff.develop.com/ballen

Is there something extra I need to do to make intellisense work when
referencing a page class? Here is my working Page_Load from a aspx
page. sourcePage does not get it's members listed with intellisense.
It acts like it is not a class but compiles fine.

Thanks,

protected void Page_Load(objec t sender, EventArgs e)
{
if (!IsPostBack)
{
if (Page.PreviousP age != null)
{
Default sourcePage = (Default)Previo usPage;
int selectedIndex = sourcePage.GetD ropDownListUnit sSelectedIndex( );
DropDownListUni ts.SelectedInde x = selectedIndex;
}
}
}

Peter Kellner
http://peterkellner.net

May 15 '06 #2
Thanks, Just what I was looking for. -Peter

"Brock Allen" <ba****@NOSPAMd evelop.com> wrote in message
news:b8******** *************** *@msnews.micros oft.com...
Add the directive:

<%@ PreviousPageTyp e VirtualPath="~/FirstPage.aspx" %>

-Brock
http://staff.develop.com/ballen

Is there something extra I need to do to make intellisense work when
referencing a page class? Here is my working Page_Load from a aspx
page. sourcePage does not get it's members listed with intellisense.
It acts like it is not a class but compiles fine.

Thanks,

protected void Page_Load(objec t sender, EventArgs e)
{
if (!IsPostBack)
{
if (Page.PreviousP age != null)
{
Default sourcePage = (Default)Previo usPage;
int selectedIndex = sourcePage.GetD ropDownListUnit sSelectedIndex( );
DropDownListUni ts.SelectedInde x = selectedIndex;
}
}
}

Peter Kellner
http://peterkellner.net


May 15 '06 #3

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

Similar topics

1
2212
by: Christopher W. Douglas | last post by:
I'm working in VB.Net, using Visual Studio 2003. I have a project, let's call it Foo, that contains common methods, forms, and objects I use in other projects. It compiles as Foo.dll, which I then reference from the project that needs it. Let's say I have a method, Bar, that I want to access from another project. If I add a public module Methods to Foo, and add a public method Bar to Methods, I can call it from my other project a...
3
2940
by: GC | last post by:
I have a web app with an aspx page in namespace Abc.WebModules.Vendors.Web. I also have business classes that are in Abc.WebModules.Vendors.Business. I have always been able to, in the aspx class, do something like: Business.Vendors vendor = new Business.Vendors("123"); then, typing vendor. would give me all my properties and methods. I don't know what changed but the intellisense stopped working. It will compile just fine but the
9
3259
by: Jim Starcher | last post by:
I cannot get the intellisense hints to work on my class constructors. Would you please tell me what I am doing wrong? public class MyObject { //Constructors /// <summary> /// Used to create an empty MyObject. /// Will use the default property values.
2
2646
by: louise raisbeck | last post by:
Hi, I am using c#. i have my server code within script tags on my aspx page i am not using code behind. Do you not get intellisense when working like this? it would speed up my work considerably but nothings happening. I may have a setting turned off but dont know where to look (have tried options, text editor but cant find anything). Also, I am a little confused about the concepts of projects and solutions. I am working on some...
2
14829
by: Don | last post by:
I'm having problems with intellisense, autocomplete, etc. suddenly not working in certain classes of a project I'm working on. All the options are set, and it all works fine for most classes, but for some it just suddenly stopped working. After a build it'll work maybe once or twice, then stop. I've tried repairing my installation of Visual Studio 2003 but that didn't help. Is Microsoft working on a fix for this, or is there something...
4
3316
by: Alan Silver | last post by:
Hello, I'm doing a cross page post, and want to pick up information from the previous page. The problem is that the previous page contains a user control that is loaded into a Placeholder at run time. I can't seem to get at the Placeholder from the target page. The first page has an empty placeholder, and the code-behind loads a user control dynamically and adds it to the placeholder. The user control grabs an ID from the querystring...
1
1270
by: Jim McGivney | last post by:
I have been trying to get the values from a previous page on my target page. I have followed the help article: ms-help://MS.VSExpressCC.v80/MS.NETFramework.v20.en/dv_aspnetcon/html/fedf234e-b7c4-4644-a9e8-c1c0870b043b.htm I do not see any deviations from the paosted code, yet the application throws an : "Object reference not set to an instance of an object." error Any suggestions would be appreciated. My complete code for both pages...
4
8568
by: Bryce | last post by:
I have a search page that submits to a search results page. I have set the search results page to be authenticated, so when the user first tries to search, it redirects them to a login screen. When they log in, it goes to the search result screen. But when I do, the PreviousPage variable is null. Once logged in, when I go from the search to the search results screen, PreviousPage is fine. I'm using the authentication built into dot...
10
2281
by: rjvrnjn | last post by:
I'm trying to pass a variable value from one page to another. Of all the ways that are available, I like the PreviousPage.FindControl() one as it lets me access the previous page controls and get the value without me being bothered about security et al. But what I find is once the page is posted the only controls that I get in PreviousPage is the master page and none of the controls of the content page are available in PreviousPage.Controls...
0
9686
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9540
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,...
0
10475
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7564
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
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
5463
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
4139
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
3757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
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.