Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

} expected

Posted on 2004-08-22
2
Medium Priority
?
749 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 1000 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 1000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

719 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