M
Morris Neuman
Hi,
I have a few pages with Views and I sometimes get the error below. I am
using Expression web2. What am I doing wrong?
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: CS1002: ; expected
Source Error:
Line 4: <script runat="server">
Line 5:
Line 6: Â Â protected void Page_Load(object sender, EventArgs e)
Line 7: Â Â {
Line 8: Â Â Â Â if (Request.QueryString["ViewIndex"] != null)
Source File: c:\Inetpub\wwwroot\SpeechSoft\site_flash\products.aspx Line:
6
Pasted from <http://192.168.11.3/SpeechSoft/products.aspx>
My page code has the following:
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["ViewIndex"] != null)
{
string strIndex = Request.QueryString["ViewIndex"].ToString();
int iIndex = 0;
try
{
iIndex = Convert.ToInt32(strIndex);
}
catch
{
}
if (iIndex > 0 && iIndex < MultiView1.Views.Count)
{
MultiView1.ActiveViewIndex = iIndex;
}
}
}
protected void ShowView1_DialogicBoards(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex = 1;
}
protected void ShowView0_TelephonySoftware(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex = 0;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>SpeechSoft Products</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta content="Telephony, T1, VoIP, Voice mail, auto attendant, fax,
outdialing, scripting" name="keywords" />
<meta content="Overview of SpeechSoft Products CALLMaster and CALLMaster IP"
name="description" />
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="layout.css" rel="stylesheet" type="text/css" />
<style type="text/css">
</style>
</head>
<body id="page2">
<form id="form1" runat="server">
<div id="main">
<!-- header -->
<div id="header">
<p>www.speechsoft.com</p>
<ul id="navi">
<li><a href="aboutSS-contacts.aspx">About Us</a></li>
<li><a href="aboutSS-contacts.aspx">Contact</a></li>
</ul>
<a href="index.aspx"><img src="images/logo.gif" id="logo" alt="" /></a>
<div id="menu">
<!--Valid flash version 8.0-->
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24"
width="404" height="39">
<param name="movie" value="flash/menu_v8.swf?button=2" />
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
<!--[if !IE]> <-->
<object data="flash/menu_v8.swf?button=2"
width="404" height="39" type="application/x-shockwave-flash">
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="pluginurl"
value="http://www.macromedia.com/go/getflashplayer" />
<param name="wmode" value="transparent" />
FAIL (the browser should render some flash content, not this).
</object>
<!--> <![endif]-->
</object>
</div>
</div>
<!-- content -->
<div id="content">
<div class="wrapper">
…..
</div>
</div>
</div>
</form>
</body>
</html>
I have a few pages with Views and I sometimes get the error below. I am
using Expression web2. What am I doing wrong?
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: CS1002: ; expected
Source Error:
Line 4: <script runat="server">
Line 5:
Line 6: Â Â protected void Page_Load(object sender, EventArgs e)
Line 7: Â Â {
Line 8: Â Â Â Â if (Request.QueryString["ViewIndex"] != null)
Source File: c:\Inetpub\wwwroot\SpeechSoft\site_flash\products.aspx Line:
6
Pasted from <http://192.168.11.3/SpeechSoft/products.aspx>
My page code has the following:
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["ViewIndex"] != null)
{
string strIndex = Request.QueryString["ViewIndex"].ToString();
int iIndex = 0;
try
{
iIndex = Convert.ToInt32(strIndex);
}
catch
{
}
if (iIndex > 0 && iIndex < MultiView1.Views.Count)
{
MultiView1.ActiveViewIndex = iIndex;
}
}
}
protected void ShowView1_DialogicBoards(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex = 1;
}
protected void ShowView0_TelephonySoftware(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex = 0;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>SpeechSoft Products</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta content="Telephony, T1, VoIP, Voice mail, auto attendant, fax,
outdialing, scripting" name="keywords" />
<meta content="Overview of SpeechSoft Products CALLMaster and CALLMaster IP"
name="description" />
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="layout.css" rel="stylesheet" type="text/css" />
<style type="text/css">
</style>
</head>
<body id="page2">
<form id="form1" runat="server">
<div id="main">
<!-- header -->
<div id="header">
<p>www.speechsoft.com</p>
<ul id="navi">
<li><a href="aboutSS-contacts.aspx">About Us</a></li>
<li><a href="aboutSS-contacts.aspx">Contact</a></li>
</ul>
<a href="index.aspx"><img src="images/logo.gif" id="logo" alt="" /></a>
<div id="menu">
<!--Valid flash version 8.0-->
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24"
width="404" height="39">
<param name="movie" value="flash/menu_v8.swf?button=2" />
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
<!--[if !IE]> <-->
<object data="flash/menu_v8.swf?button=2"
width="404" height="39" type="application/x-shockwave-flash">
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="pluginurl"
value="http://www.macromedia.com/go/getflashplayer" />
<param name="wmode" value="transparent" />
FAIL (the browser should render some flash content, not this).
</object>
<!--> <![endif]-->
</object>
</div>
</div>
<!-- content -->
<div id="content">
<div class="wrapper">
…..
</div>
</div>
</div>
</form>
</body>
</html>