Solved

} expected

Posted on 2004-08-22
2
746 Views
Last Modified: 2012-06-27
Compiler Error Message: CS1513: } expected

Source Error:

Line 62:              
Line 63:      
Line 64:          void addcard1 (Object Sender, EventArgs e) {              <-- in red
Line 65:          
Line 66:          public string customerid;


ASPX source

<%@ Page Language="C#" EnableViewState="false" Debug="true" %>


<script runat="server">
   
   
    public string result ="";
      
         void Page_Load(Object sender, EventArgs e) {

             // Obtain categoryId from QueryString

               string destination;
               string customerid;
               


               
            customerid = Session["customerid"].ToString();
                  
                       if (customerid != null) {
                  
                          destination="MyAccount";
                         Session["destination"] = destination;
                  
                         Response.Redirect("login.aspx");
                           }
                          
                      else {
                  
                                  int cust = Convert.ToInt32(Session["available"]);
                                  
             IBuySpy.CustomersDB1 customerprofile = new IBuySpy.CustomersDB1();

              MyList.DataSource = customerprofile.GetUsers(cust);
              MyList.DataBind();
             
              IBuySpy.OrdersDB1 orderHistory = new IBuySpy.OrdersDB1();
             
                    MyList2.DataSource = orderHistory.GetCustomerOrders(cust);
                    MyList2.DataBind();
                               }  
                  
         }
             
     
         void addcard1 (Object Sender, EventArgs e) {
         
         public string customerid;
         customerid = Convert.ToInt32(Session["customerid"]);
         IBuySpy.CustomersDB1 addcard = new IBuySpy.CustomersDB1();
         addcard.addcc(c1.Text, customerid);
         
         Response.Redirect("MyAccount.aspx");
         
              }
         }

</script>
0
Comment
Question by:dprasad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
shovavnik earned 250 total points
ID: 11867916
Does this link apply to you?

It seems the problem could be with your implementation of the IBuySpy/CustomerDB1 class.
You're probably not implementing some of the functions defined by an interface the class is supposed to implement, or something like that.
The link has a suggested resolution.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;315740
0
 
LVL 4

Assisted Solution

by:chipple
chipple earned 250 total points
ID: 11868531
Here are the problems that I found at a first look.

1. You currently have one } too many at the end of your script (just before </script>).
2. You're trying to declare a public variable within your function addcard;, remove the public keyword in front of string customerid;.

Good luck!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ASP.NET Content Page 3 64
Display Error Message in Asp.net Modal Validation Partial View 3 39
Data Analysis 7 59
How do I "share" on social sites? 2 39
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question