473,385 Members | 1,359 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,385 software developers and data experts.

imports

I am playing with Forms Authentication and I have the following imports
statement at the top.

Imports System.Web.Security

Now when I use
FormsAuthentication.RedirectFromLoginPage(foo) then I get squiggly's from
the GUI saying RedirectFromLoginPage is not a member of FormsAuthentication.

If I attach System.Web.Security to FormsAuthentication all is fine.

Why is this? I have expierenced this in the past with the System.IO
namespace. Where sometimes I needed to fully qualify the name even if I had
an Imports statement.

Thanks
Nov 18 '05 #1
6 1534
And your page class's (page's) name doesn't happen to be
FormsAuthentication? This could be if two class names in same scope collide
when fully-qualified name is needed to identify them.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke

"Brian Shannon" <bs******@lbrspec.com> wrote in message
news:uH**************@TK2MSFTNGP10.phx.gbl...
I am playing with Forms Authentication and I have the following imports
statement at the top.

Imports System.Web.Security

Now when I use
FormsAuthentication.RedirectFromLoginPage(foo) then I get squiggly's from
the GUI saying RedirectFromLoginPage is not a member of FormsAuthentication.
If I attach System.Web.Security to FormsAuthentication all is fine.

Why is this? I have expierenced this in the past with the System.IO
namespace. Where sometimes I needed to fully qualify the name even if I had an Imports statement.

Thanks

Nov 18 '05 #2
No, I created a new project to play with forms authentication. I only have
two pages: Login.aspx and PublicPage.aspx.

I copied the code out of ASP.NET unleashed. The books code doesn't fully
qualify the class name.

Thanks
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:eE**************@TK2MSFTNGP12.phx.gbl...
And your page class's (page's) name doesn't happen to be
FormsAuthentication? This could be if two class names in same scope collide when fully-qualified name is needed to identify them.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke

"Brian Shannon" <bs******@lbrspec.com> wrote in message
news:uH**************@TK2MSFTNGP10.phx.gbl...
I am playing with Forms Authentication and I have the following imports
statement at the top.

Imports System.Web.Security

Now when I use
FormsAuthentication.RedirectFromLoginPage(foo) then I get squiggly's from the GUI saying RedirectFromLoginPage is not a member of

FormsAuthentication.

If I attach System.Web.Security to FormsAuthentication all is fine.

Why is this? I have expierenced this in the past with the System.IO
namespace. Where sometimes I needed to fully qualify the name even if I

had
an Imports statement.

Thanks


Nov 18 '05 #3
On Mon, 16 Aug 2004 10:45:10 -0500, Brian Shannon <bs******@lbrspec.com>
wrote:
No, I created a new project to play with forms authentication. I only
have
two pages: Login.aspx and PublicPage.aspx.

I copied the code out of ASP.NET unleashed. The books code doesn't fully
qualify the class name.

Thanks
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:eE**************@TK2MSFTNGP12.phx.gbl...
And your page class's (page's) name doesn't happen to be
FormsAuthentication? This could be if two class names in same scope

collide
when fully-qualified name is needed to identify them.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke

"Brian Shannon" <bs******@lbrspec.com> wrote in message
news:uH**************@TK2MSFTNGP10.phx.gbl...
> I am playing with Forms Authentication and I have the following

imports
> statement at the top.
>
> Imports System.Web.Security
>
> Now when I use
> FormsAuthentication.RedirectFromLoginPage(foo) then I get squiggly's from > the GUI saying RedirectFromLoginPage is not a member of

FormsAuthentication.
>
> If I attach System.Web.Security to FormsAuthentication all is fine.
>
> Why is this? I have expierenced this in the past with the System.IO
> namespace. Where sometimes I needed to fully qualify the name even

if I
had
> an Imports statement.
>
> Thanks
>
>



Have you tried right clicking on FormsAuthentication in your code, then Go
to Definition? This should take you to the object browser where you can
check what namespace it's pulling from and if that method is there. Which
it should be, of course...

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #4
I tried your solution by going to the object browser and found that it is
pulling from my imported namesapce system.web.secutity.

Thanks anyways for your recommendation.

"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message
news:op**************@web-1161d.webservices.nrt...
On Mon, 16 Aug 2004 10:45:10 -0500, Brian Shannon <bs******@lbrspec.com>
wrote:
No, I created a new project to play with forms authentication. I only
have
two pages: Login.aspx and PublicPage.aspx.

I copied the code out of ASP.NET unleashed. The books code doesn't fully qualify the class name.

Thanks
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:eE**************@TK2MSFTNGP12.phx.gbl...
And your page class's (page's) name doesn't happen to be
FormsAuthentication? This could be if two class names in same scope

collide
when fully-qualified name is needed to identify them.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke

"Brian Shannon" <bs******@lbrspec.com> wrote in message
news:uH**************@TK2MSFTNGP10.phx.gbl...
> I am playing with Forms Authentication and I have the following
imports
> statement at the top.
>
> Imports System.Web.Security
>
> Now when I use
> FormsAuthentication.RedirectFromLoginPage(foo) then I get squiggly's

from
> the GUI saying RedirectFromLoginPage is not a member of
FormsAuthentication.
>
> If I attach System.Web.Security to FormsAuthentication all is fine.
>
> Why is this? I have expierenced this in the past with the System.IO
> namespace. Where sometimes I needed to fully qualify the name even
if I
had
> an Imports statement.
>
> Thanks
>
>


Have you tried right clicking on FormsAuthentication in your code, then Go
to Definition? This should take you to the object browser where you can
check what namespace it's pulling from and if that method is there. Which
it should be, of course...

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Nov 18 '05 #5
On Mon, 16 Aug 2004 11:08:03 -0500, Brian Shannon <bs******@lbrspec.com>
wrote:
I tried your solution by going to the object browser and found that it is
pulling from my imported namesapce system.web.secutity.

Thanks anyways for your recommendation.

"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message
news:op**************@web-1161d.webservices.nrt...
On Mon, 16 Aug 2004 10:45:10 -0500, Brian Shannon <bs******@lbrspec.com>
wrote:
> No, I created a new project to play with forms authentication. I only
> have
> two pages: Login.aspx and PublicPage.aspx.
>
> I copied the code out of ASP.NET unleashed. The books code doesn't fully > qualify the class name.
>
> Thanks
> "Teemu Keiski" <jo****@aspalliance.com> wrote in message
> news:eE**************@TK2MSFTNGP12.phx.gbl...
>> And your page class's (page's) name doesn't happen to be
>> FormsAuthentication? This could be if two class names in same scope
> collide
>> when fully-qualified name is needed to identify them.
>>
>> --
>> Teemu Keiski
>> MCP, Microsoft MVP (ASP.NET), AspInsiders member
>> ASP.NET Forum Moderator, AspAlliance Columnist
>> http://blogs.aspadvice.com/joteke
>>
>>
>>
>> "Brian Shannon" <bs******@lbrspec.com> wrote in message
>> news:uH**************@TK2MSFTNGP10.phx.gbl...
>> > I am playing with Forms Authentication and I have the following
>> imports
>> > statement at the top.
>> >
>> > Imports System.Web.Security
>> >
>> > Now when I use
>> > FormsAuthentication.RedirectFromLoginPage(foo) then I get

squiggly's
> from
>> > the GUI saying RedirectFromLoginPage is not a member of
>> FormsAuthentication.
>> >
>> > If I attach System.Web.Security to FormsAuthentication all is fine.
>> >
>> > Why is this? I have expierenced this in the past with the

System.IO
>> > namespace. Where sometimes I needed to fully qualify the name even
>> if I
>> had
>> > an Imports statement.
>> >
>> > Thanks
>> >
>> >
>>
>>
>
>

Have you tried right clicking on FormsAuthentication in your code, then
Go
to Definition? This should take you to the object browser where you can
check what namespace it's pulling from and if that method is there.
Which
it should be, of course...

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET



And the method was listed there, I assume?

OK, is it not compiling? Or just getting squigglies but will compile?
There's an option in Tools->Option->Text Editor->All Languages (General).
Try unchecking Hide advanced members. This does what it says and
sometimes can be confusing as the code still compiles.

My last ditch effort :-)

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #6
Thanks Craig for you help but the code will not compile unless I fully
qualify the namespace. If it's not fully qualified I get a message saying
RedirectFrom LoginPage is not a member of FormsAuthentication.

Thanks
"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message
news:op**************@web-1161d.webservices.nrt...
On Mon, 16 Aug 2004 11:08:03 -0500, Brian Shannon <bs******@lbrspec.com>
wrote:
I tried your solution by going to the object browser and found that it is pulling from my imported namesapce system.web.secutity.

Thanks anyways for your recommendation.

"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message
news:op**************@web-1161d.webservices.nrt...
On Mon, 16 Aug 2004 10:45:10 -0500, Brian Shannon <bs******@lbrspec.com> wrote:

> No, I created a new project to play with forms authentication. I only > have
> two pages: Login.aspx and PublicPage.aspx.
>
> I copied the code out of ASP.NET unleashed. The books code doesn't

fully
> qualify the class name.
>
> Thanks
> "Teemu Keiski" <jo****@aspalliance.com> wrote in message
> news:eE**************@TK2MSFTNGP12.phx.gbl...
>> And your page class's (page's) name doesn't happen to be
>> FormsAuthentication? This could be if two class names in same scope
> collide
>> when fully-qualified name is needed to identify them.
>>
>> --
>> Teemu Keiski
>> MCP, Microsoft MVP (ASP.NET), AspInsiders member
>> ASP.NET Forum Moderator, AspAlliance Columnist
>> http://blogs.aspadvice.com/joteke
>>
>>
>>
>> "Brian Shannon" <bs******@lbrspec.com> wrote in message
>> news:uH**************@TK2MSFTNGP10.phx.gbl...
>> > I am playing with Forms Authentication and I have the following
>> imports
>> > statement at the top.
>> >
>> > Imports System.Web.Security
>> >
>> > Now when I use
>> > FormsAuthentication.RedirectFromLoginPage(foo) then I get
squiggly's
> from
>> > the GUI saying RedirectFromLoginPage is not a member of
>> FormsAuthentication.
>> >
>> > If I attach System.Web.Security to FormsAuthentication all is fine. >> >
>> > Why is this? I have expierenced this in the past with the
System.IO
>> > namespace. Where sometimes I needed to fully qualify the name even >> if I
>> had
>> > an Imports statement.
>> >
>> > Thanks
>> >
>> >
>>
>>
>
>
Have you tried right clicking on FormsAuthentication in your code, then
Go
to Definition? This should take you to the object browser where you can check what namespace it's pulling from and if that method is there.
Which
it should be, of course...

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET



And the method was listed there, I assume?

OK, is it not compiling? Or just getting squigglies but will compile?
There's an option in Tools->Option->Text Editor->All Languages (General).
Try unchecking Hide advanced members. This does what it says and
sometimes can be confusing as the code still compiles.

My last ditch effort :-)

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Nov 18 '05 #7

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

Similar topics

1
by: Steven K | last post by:
Hello, Is there a way to declare imports so that they don't have to be declared both in Master Page.vb and the Content Page.vb? For example, I have the following in the Master Page.vb Imports...
19
by: Tiraman | last post by:
Hi , I have an assembly that hold few class and few imports which are not used in all of the class's . so my question is when to use the "Imports XXX" And when to use this kind of statement...
4
by: Jeff Jarrell | last post by:
I am not really there yet with namespaces. I have a "common.dll" that is referenced from another project. now in the consuming project, source file to i'd like to have a "imports common". ...
7
by: pcnerd | last post by:
In Java I can use, for example, " Imports java.util.* ". Can I use, for example, " Imports System.* " instead of several different "Imports" statements? Thank you. David
1
by: Arpan | last post by:
What's the difference between "Imports" & "Inherits"? For e.g. both the codes below work without any errors: Imports System Imports System.Data Imports System.Web.UI Namespace Constructors...
1
by: Thomas Wittek | last post by:
Hi! Is there any possibility/tool to automatically organize the imports at the beginning of a module? I don't mean automatic imports like autoimp does as I like seeing where my...
5
by: kimiraikkonen | last post by:
Hello, I want to ask about "imports" statement. Some projects must be inserted with "imports xxxx" statements before beginning coding. But how do i know when to use or do i have to use "imports"...
0
by: Kay Schluehr | last post by:
Since their introduction in Python 2.5 I only reviewed the new "relative import" notation briefly by reading the "What's new in Python 2.5" article. Now I wanted checkout if I get comfortable with...
4
by: Albert | last post by:
Hi, when do i need this: Imports System.Data and when this: Imports System.Data.SqlClient? More specifically, when i want to perform a select or update of a table using: connection = New...
3
by: Mohamed Yousef | last post by:
Hello , The problem I'm asking about is how can imported modules be aware of other imported modules so they don't have to re-import them (avoiding importing problems and Consicing code and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.