473,793 Members | 2,865 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

imports

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

Imports System.Web.Secu rity

Now when I use
FormsAuthentica tion.RedirectFr omLoginPage(foo ) then I get squiggly's from
the GUI saying RedirectFromLog inPage is not a member of FormsAuthentica tion.

If I attach System.Web.Secu rity to FormsAuthentica tion 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 1551
And your page class's (page's) name doesn't happen to be
FormsAuthentica tion? 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******@lbrsp ec.com> wrote in message
news:uH******** ******@TK2MSFTN GP10.phx.gbl...
I am playing with Forms Authentication and I have the following imports
statement at the top.

Imports System.Web.Secu rity

Now when I use
FormsAuthentica tion.RedirectFr omLoginPage(foo ) then I get squiggly's from
the GUI saying RedirectFromLog inPage is not a member of FormsAuthentica tion.
If I attach System.Web.Secu rity to FormsAuthentica tion 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****@aspalli ance.com> wrote in message
news:eE******** ******@TK2MSFTN GP12.phx.gbl...
And your page class's (page's) name doesn't happen to be
FormsAuthentica tion? 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******@lbrsp ec.com> wrote in message
news:uH******** ******@TK2MSFTN GP10.phx.gbl...
I am playing with Forms Authentication and I have the following imports
statement at the top.

Imports System.Web.Secu rity

Now when I use
FormsAuthentica tion.RedirectFr omLoginPage(foo ) then I get squiggly's from the GUI saying RedirectFromLog inPage is not a member of

FormsAuthentica tion.

If I attach System.Web.Secu rity to FormsAuthentica tion 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******@lbrsp ec.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****@aspalli ance.com> wrote in message
news:eE******** ******@TK2MSFTN GP12.phx.gbl...
And your page class's (page's) name doesn't happen to be
FormsAuthentica tion? 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******@lbrsp ec.com> wrote in message
news:uH******** ******@TK2MSFTN GP10.phx.gbl...
> I am playing with Forms Authentication and I have the following

imports
> statement at the top.
>
> Imports System.Web.Secu rity
>
> Now when I use
> FormsAuthentica tion.RedirectFr omLoginPage(foo ) then I get squiggly's from > the GUI saying RedirectFromLog inPage is not a member of

FormsAuthentica tion.
>
> If I attach System.Web.Secu rity to FormsAuthentica tion 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 FormsAuthentica tion 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.secu tity.

Thanks anyways for your recommendation.

"Craig Deelsnyder" <cdeelsny@no_sp am_4_meyahoo.co m> wrote in message
news:op******** ******@web-1161d.webservic es.nrt...
On Mon, 16 Aug 2004 10:45:10 -0500, Brian Shannon <bs******@lbrsp ec.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****@aspalli ance.com> wrote in message
news:eE******** ******@TK2MSFTN GP12.phx.gbl...
And your page class's (page's) name doesn't happen to be
FormsAuthentica tion? 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******@lbrsp ec.com> wrote in message
news:uH******** ******@TK2MSFTN GP10.phx.gbl...
> I am playing with Forms Authentication and I have the following
imports
> statement at the top.
>
> Imports System.Web.Secu rity
>
> Now when I use
> FormsAuthentica tion.RedirectFr omLoginPage(foo ) then I get squiggly's

from
> the GUI saying RedirectFromLog inPage is not a member of
FormsAuthentica tion.
>
> If I attach System.Web.Secu rity to FormsAuthentica tion 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 FormsAuthentica tion 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******@lbrsp ec.com>
wrote:
I tried your solution by going to the object browser and found that it is
pulling from my imported namesapce system.web.secu tity.

Thanks anyways for your recommendation.

"Craig Deelsnyder" <cdeelsny@no_sp am_4_meyahoo.co m> wrote in message
news:op******** ******@web-1161d.webservic es.nrt...
On Mon, 16 Aug 2004 10:45:10 -0500, Brian Shannon <bs******@lbrsp ec.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****@aspalli ance.com> wrote in message
> news:eE******** ******@TK2MSFTN GP12.phx.gbl...
>> And your page class's (page's) name doesn't happen to be
>> FormsAuthentica tion? 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******@lbrsp ec.com> wrote in message
>> news:uH******** ******@TK2MSFTN GP10.phx.gbl...
>> > I am playing with Forms Authentication and I have the following
>> imports
>> > statement at the top.
>> >
>> > Imports System.Web.Secu rity
>> >
>> > Now when I use
>> > FormsAuthentica tion.RedirectFr omLoginPage(foo ) then I get

squiggly's
> from
>> > the GUI saying RedirectFromLog inPage is not a member of
>> FormsAuthentica tion.
>> >
>> > If I attach System.Web.Secu rity to FormsAuthentica tion 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 FormsAuthentica tion 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 FormsAuthentica tion.

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

Thanks anyways for your recommendation.

"Craig Deelsnyder" <cdeelsny@no_sp am_4_meyahoo.co m> wrote in message
news:op******** ******@web-1161d.webservic es.nrt...
On Mon, 16 Aug 2004 10:45:10 -0500, Brian Shannon <bs******@lbrsp ec.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****@aspalli ance.com> wrote in message
> news:eE******** ******@TK2MSFTN GP12.phx.gbl...
>> And your page class's (page's) name doesn't happen to be
>> FormsAuthentica tion? 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******@lbrsp ec.com> wrote in message
>> news:uH******** ******@TK2MSFTN GP10.phx.gbl...
>> > I am playing with Forms Authentication and I have the following
>> imports
>> > statement at the top.
>> >
>> > Imports System.Web.Secu rity
>> >
>> > Now when I use
>> > FormsAuthentica tion.RedirectFr omLoginPage(foo ) then I get
squiggly's
> from
>> > the GUI saying RedirectFromLog inPage is not a member of
>> FormsAuthentica tion.
>> >
>> > If I attach System.Web.Secu rity to FormsAuthentica tion 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 FormsAuthentica tion 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
1901
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 System Imports System.Web Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Data
19
1854
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 Dim X as New System.XXX ....
4
1432
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". But what happens is that I have to specify the class as well, as in... "imports common.util".
7
2029
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
1466
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 Public Class Constr : Inherits Page Public Sub New()
1
1895
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 objects/functions really come from. For the same reason I don't like "from foo import *". The downside is that you have a rather verbose import section at the
5
13370
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" statement? How will i know which "imports" will my project need? From books or how can i guess? Thanks...
0
1402
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 them. Opening the tutorial I found following notice ( 6.4.2 ): "Note that both explicit and implicit relative imports are based on the name of the current module. Since the name of the main module is always "__main__", modules
4
5197
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 SqlConnection(connectionstr) comd = New SqlCommand()
3
1829
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 imports ) Take Example :- in A.py :- import B print dir() # no problems we can see B which contain re module and C module
0
9671
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
10433
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
10161
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
10000
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...
1
7538
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
6777
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
5436
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
4112
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
3720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.