Error with Page Views

Discussion in 'ASP .Net Web Controls' started by Morris Neuman, Jun 30, 2009.

  1. 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="clsid:D27CDB6E-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>


    --
    Thanks
    Morris

    -----------------------------------------------------------------------------
    Less Spam Better enjoyable experience
    Visit : news://spacesst.com
     
    Morris Neuman, Jun 30, 2009
    #1
    1. Advertising

  2. Hi Morris,

    >I have a few pages with Views and I sometimes get the error below. I am
    >using Expression web2. What am I doing wrong?


    I cannot see the MultiView1 in the aspx code. Could you send me the
    project? My email is update here after sending
    the project in case I missed that email.

    Regards,
    Allen Chen
    Microsoft Online Support

    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

    Note: MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 2 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions. Issues of this
    nature are best handled working with a dedicated Microsoft Support Engineer
    by contacting Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
    ==================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.




    -----------------------------------------------------------------------------
    Less Spam Better enjoyable experience
    Visit : news://spacesst.com
     
    Allen Chen [MSFT], Jun 30, 2009
    #2
    1. Advertising

  3. Hi Morris,

    >I have a few pages with Views and I sometimes get the error below. I am
    >using Expression web2. What am I doing wrong?


    Have you sent me the project?

    Regards,
    Allen Chen
    Microsoft Online Support
     
    Allen Chen [MSFT], Jul 7, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony George
    Replies:
    1
    Views:
    604
    Jim Gibson
    Nov 14, 2003
  2. Tim Rogers

    Having One Page Produce Multiple Views

    Tim Rogers, Nov 7, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    580
    George Ter-Saakov
    Nov 10, 2003
  3. Guadala Harry
    Replies:
    4
    Views:
    809
    Teemu Keiski
    Sep 11, 2004
  4. Andy B
    Replies:
    2
    Views:
    333
    Andy B
    Nov 27, 2007
  5. la_haine
    Replies:
    4
    Views:
    164
    la_haine
    Oct 29, 2003
Loading...

Share This Page