Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 19th, 2005, 11:47 PM
Registered User
 
Join Date: Jan 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help on aspx!

Hi everyone,
I'm new to asp.net....hope someone can help me....i keep encountering this Compiler Error Message: BC30188: Declaration expected.

Source Error:

Line 68:
Line 69:
Line 70: <form id='login' name='frmLogin' method='post' runat='server' action='startmenu.aspx'>
Line 71:
Line 72: <b>Username:</b>


this is my source code:

<form id='login' name='frmLogin' method='post' runat='server' action='startmenu.aspx'>

<b>Username:</b>
    <asp:TextBox ID ="USR" Runat=server text=Response.write("USR") MAXLENGTH=12></asp:TextBox><br>
<b>Password:</b><br>
    <asp:TextBox ID ="PWD" Runat=server text=Response.write("PWD") TEXTMODE=Password MAXLENGTH=12/><asp:TextBox><br>
    </asp:TextBox>
<b>Login Year:</b>

<%List1 Conn%>



<asp:Button Text="Login" OnClick="submitButton_click" Runat="server" ID="BtnLogin" />


</form>

i really have no idea where did i go wrong....someone pls help..
thanks

 
Old January 19th, 2005, 11:53 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Is that all of your code?
You need a page declaration, something like:
<%@ Page language="c#" Codebehind="startmenu.aspx.cs" AutoEventWireup="false" Inherits="ProjectName.startmenu" %>
Also need <HTML> and <BODY> Tags.




======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
 
Old January 19th, 2005, 11:54 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

If not using Codebehind declaration might be
<%@ Page language="c#" %>

Above for C# by the way

======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
 
Old January 19th, 2005, 11:58 PM
Registered User
 
Join Date: Jan 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

that was just part of my codes...these are my page declaration:
<%@ Page Language="VB" Codebehind="startmenu.aspx.cs" AutoEventWireup="false" Inherits="Proj.startmenu"%>
<%@ Import namespace="ADODB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDB" %>

I also had the <HTML> and <BODY> tags....but i still have the same error msg....

thanks.

 
Old January 20th, 2005, 12:07 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Sorry,
I didn't read you code very carefully.
Things like: text=Response.write("USR")
Are not allowed in ASP.NET, Actually that would not have got you very far in Classic asp, but never mind that.

Read this: http://ryangregg.com/archive/2004/04/22/792.aspx

The format for html Server includes is <%# variableName%>.
But hte variable must be part of your Server side code.



======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
 
Old January 20th, 2005, 12:11 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Actually, may not need the #, I tend to do this sort of thing in code behind.
Another good link to look at is.
http://samples.gotdotnet.com/quickstart/aspplus/

======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
 
Old January 20th, 2005, 01:40 AM
Registered User
 
Join Date: Jan 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks...would try again after reading the two links...





Similar Threads
Thread Thread Starter Forum Replies Last Post
New.aspx works but login.aspx fails Validation nigelhamilton BOOK: ASP.NET Website Programming Problem-Design-Solution 8 September 13th, 2004 02:29 AM
New.aspx works but not Login.aspx ? reidcor BOOK: ASP.NET Website Programming Problem-Design-Solution 2 May 24th, 2004 10:32 AM
new to ASPX wesamo ASP.NET 1.0 and 1.1 Basics 2 April 19th, 2004 11:50 PM
HowTo Pass Form data from Page1.aspx to Page2.aspx dati ASP.NET 1.0 and 1.1 Basics 6 January 27th, 2004 06:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.