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

page 372 dev web applications book

Hi I am trying to run a simple windows authentication example in the Microsoft web apps book page 372 and
in the page load sub I am getting the errors, name spnAuthenticated not declared, spnUserName not declared, spnAuthenticationType not declared

In startup pageload subroutine, I hav
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loa
'Put user code to initialize the page her
spnAuthenticated.InnerText = User.Identity.Nam
spnUserName.InnerText = User.Identity.Nam
spnAuthenticationType.InnerText = User.Identity.AuthenticationTyp
End Su
In my web.config file I hav
<authorization><deny users="?" /><!-- Allow all users --><!-- <allow users="[comma separated list of users]
roles="[comma separated list of roles]"/><deny users="[comma separated list of users]
roles="[comma separated list of roles]"/
--></authorization

In the HTML of startup page I added the table definition and hav

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="authentication_test.WebForm1"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><title>WebForm1</title><meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1"><meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1"><meta name="vs_defaultClientScript" content="JavaScript"><meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"></HEAD><body MS_POSITIONING="GridLayout"><form id="Form1" method="post" runat="server">&nbsp
<TABLE id="tbUser"><TR><TD>Authenticated</TD><TD><span runat="server" id="spnAuthenticated"></span></TD><TD>User Name</TD><TD><span runat ="server" id="spnUserName"></span></TD><TD>Authentication type </TD><TD><span runat="server" id ="spnAuthenticationType"></span></TD></TR></TABLE></form></body></HTML
I had to put the <tr></tr>tags above and below the <TD> tags as I got an error <TD> not allowed within table
In the book on page 372 it does not have the <TR> ta
Also just wondering why spnAuthenticated, ect is not declared. Thanks Paul.
Nov 18 '05 #1
2 1309
The spnAuthenticated may be hidden from you. Expand the portion of the code behind file in the " Web Form Designer Generated Code " region ... it is most likely defined in there since you are working in VB.NET
Nov 18 '05 #2
ok thanks for the information. I just re-opened the project and expanded that section of code and it built ok.
Nov 18 '05 #3

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

Similar topics

1
by: Tony Baker | last post by:
Hi, I want to write a web application with C++ as the code behind it. I want to use existing code, which uses CString, but it would be great if I could use ATL to take care of that. I am having...
17
by: Venkatesh | last post by:
Hi All I am a newbie to C# .I am currently developing windows application.Can anyone suggest good books or links for developing Windows Applications using C#.
6
by: Tina | last post by:
Hello, I'm currently preparing for the exam 70-315. I'm using the Self-paced training kit "Developing Web Applications with Microsoft Visual C#.NET", but I find it rather difficult. I have...
4
by: Glenn M | last post by:
I have a shared XML file on a server . i also have one xslt file that performs a simple transform on in to view the data. now i want to have another page that lets users modify the shared xml...
24
by: Randall Arnold | last post by:
I know how to use MSHTML to grab the innerhtml from an html web page, but what if I want to look at elements of a rendered aspx page? Is there any way to do this using the MSHTML DOM object? ...
2
by: mesut demir | last post by:
Dear collegeaus, I would like to learn Visual Basic.NET and working with DATABASES. My intention is making some Windows programs using Database & Internet programs using Databaseses.(SQL) ...
6
by: =?Utf-8?B?Sm9l?= | last post by:
Hello, I have 10 years of experience working as a Webmaster. For about an year I worked on a 3-tier ASP application which gave me a good experience with SQL Server (Stored procedures) and...
4
by: Gernot Bauer | last post by:
Hi! I plan to develope a web application with PHP, and I am looking for a book that aids me. I already have experience with PHP as well as relational databases, but I never have written a big...
13
by: Wade Yin | last post by:
Hi, If I can write a ActiveX component that can support socket communication in webpage, that will make browser have strongger capability to communicate with different clients, but not only can...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.