Solved

} expected

Posted on 2004-08-22
2
737 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now