CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 HELP!!!! Compiler Error Message: BC30451: Name 'CheckOne' is not declared.

Print topic Send  topic

Author Message
Pinjosi

Posts: 1
Posted: 09/12/2007, 1:19 PM

I have a problem the script give me the following error:

Compiler Error Message: BC30451: Name 'CheckOne' is not declared.

Source Error:



Line 35: ' then default the radio button selected.
Line 36: if session("intLength") = "1" then
Line 37: CheckOne = "Checked"
Line 38: Flag = 1
Line 39: end if



This is the script:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Subscription.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Oabis IT</title>
</head>
<body>

<form id="form1" runat="server">
<div>

<!-- Setup the Header -->

<center><font size="4" color="blue"><b>XYZ Publication</b></font></center>

<!-- Start the form that will post the ProcessSub.asp page. -->

<form method="post" action="Processsub.aspx"></form>

<!-- Next the table starts that will layout the data entry form -->
<center>
<table border=1>

<!-- Subscription Length -->

<tr>
<td align="right">Subscription Length:</td>
<td>

<%

' Check to see if a length was set. If so
' then default the radio button selected.
if session("intLength") = "1" then
CheckOne = "Checked"
Flag = 1
end if

if session("intLength") = "2" then
CheckTwo = "Checked"
Flag = 1
end if

if session(intLength") = "3" then
CheckThree = "Checked"
Flag = 1
end if

' If this is the first time the form is
' displayed in the session then default to
' a length of one year
if Flag <> 1 then CheckOne = "Checked"

%>
<!-- radio buttons for selecting the length -->
<input type="radio" value="1" name="intLength" <%=CheckOne%>>One Year
<input type="radio" value="2" name="intLength" <%=CheckTwo%>>Two Year
<input type="radio" value="3" name="intLength" <%=CheckThree%>>Three Year
</td>
</tr>

<!-- first Name -->
<tr>
<td align="right">First Name:</td>
<!-- Input field for the first name -->
<td><input type="text" value="<%=session("chrFirstName")%>"
name="chrFirstName"></td></tr>

<!-- Last Name -->
<tr>
<td align="right">Last Name:</td>
<!-- Input field for the last name -->
<td><input type="text" value="<%=session("chrLastName")%>"
name="chrLastName"></td></tr>

<!-- Address -->
<tr>
<td align="right">Adress:</td>
<!-- Input field for Address -->
<td><input type="text" value="<%=session("chrAddress") %>"
name="chrAddress"></td></tr>

<!-- City -->
<tr>
<td align="right">City:</td>
<!-- Input field for the city -->
<td><input type="text" value="<%session(chrCity") %>"
name="chrCity"></td></tr>

<!-- State -->
<tr>
<td align="right">State:</td>
<!-- Input field for the state -->
<td><input type="text" value="<%session(chrState") %>"
name="chrState"></td></tr>

<!-- Zip Code -->
<tr>
<td align="right">Zip Code:</td>
<!-- Input field for the zip code -->
<td><input type="text" value="<%session(chrZipCode") %>"
name="chrZipCode"></td></tr>

<!-- Phone Number -->
<tr>
<td align="right">Phone Number:</td>
<!-- Input field for the phone number -->
<td><input type="text" value="<%session(chrPhone") %>"
name="chrPhone"></td></tr>

<!-- Email Address -->
<tr>
<td align="right">Email Address:</td>
<!-- Input field for the email address -->
<td><input type="text" value="<%session(chrEmail") %>"
name="chrEmail"></td></tr>

<!-- Name on Card -->
<tr>
<td align="right">Name on Card:</td>
<!-- Input field for the name on card -->
<td><input type="text" value="<%session(chrCardName") %>"
name="chrCardName"></td></tr>

<!-- Input field for the credit card type -->
<tr>
<td align="right">Card Type:</td>
<td>

<%

' Check to see which card was selected previously
' if there was an error.
if session("chrCardType") = "Visa" then
SelVisa = Selected"
end if

if session("chrCardType") = "MasterCard" then
SelMC = "Selected"
end if

if session("chrCardType") = "AmEx" then
SelAmEx = "Selected"
end if

%>

<!-- Select box for the type of cards -->
<select name="chrCardType">
<option value="Visa" <%=SelVisa %> >Visa
<option value="MasterCard" <%=SelMC %> >MasterCard
<option value="AmEx" <%=SelAmEx %> >american Express
</select>

</td>
</tr>

<!-- Credit Card Number -->
<tr>
<td align="right">Card Number</td>
<!-- Input filed for the credit card number -->
<td><input type="text" value="<%session("chrCardNumber") %>"
name="chrCardNumber"></td></tr>

<!-- Credit card expiration date -->
<tr>
<td align="right">Expiration Date:</td>
<!-- Input field for the expiration date -->
<td><input type="text" value="<%=session("chrExpDate") %>"
name="chrExpDate"></td></tr>


<!-- Submit Button -->
<tr>
<td colspan="2" align="center">
<input type="submit" value="Subscribe!" name="submit">
</td></tr>

</table>

</center>

<!-- Closing tag for the end of the form -->




</div>
</form>
</body>
</html>


PLZ someone help :(
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.