TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
cdog
NA
37
0
beginner woes
Apr 4 2007 6:15 PM
This is probably an easy fix but I can not for the life of me find what is causing this error. I am translating a monster
vb
.net to c# script and this is the latest error:
Compiler Error Message: CS1513: } expected
Source Error:
Line 91: }
Line 92:
Line 93: void SaveComps() {
Line 94: private string Result;
Line 95: private string Source;
Here is my code:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class BPOCompSalesListings : System.Web.UI.Page
{
private string bpo;
private string strRequestID;
private string ProductCode;
private void Page_Load(object sender, System.EventArgs e) {
Helper.checkSession(Session, Page);
if (!(Request.QueryString["PRODUCT"] == null)) {
ProductCode = Request.QueryString["PRODUCT"];
}
strRequestID = Request.QueryString["RequestID"];
ClientScript.RegisterClientScriptInclude("autosave", "scripts\\autosave.js");
ClientScript.RegisterStartupScript(this.GetType(), "myAutoSave", "AutoSaveInit(600000);", true);
string script = "function SubmitFormToBeSaved() { " + ClientScript.GetPostBackEventReference(btnSubmit, "") + "; } ";
ClientScript.RegisterClientScriptBlock(this.GetType(), "autosave", script, true);
if (!Page.IsPostBack) {
if (!(strRequestID == null)) {
if (loadBPO(true)) {
// ensure we have fresh data
loadControls();
}
}
// Make sure the brokerinfo matches the current lmc working on the assignment
// Helper.setBrokerInfo(Request.QueryString("RequestID"))
// ClientScript.RegisterStartupScript(Me.GetType(), "
popup
", "
javascript
:window.showmodaldialog('ValidateBPO.aspx', '', ''", True)
// ClientScript.RegisterStartupScript(Me.GetType(), "popup", "ShowPopup('ValidateBPO.aspx')", True)
btnOk.Visible = false;
PanelExtraValidation.Visible = false;
ButtonComment.Attributes.Add("onclick", "javascript:alert(\'Submitting form for approval.\');");
}
}
private bool loadBPO(bool refreshBPO) {
// force new bpo if none exists or we just saved data
// If Session("bpo") Is Nothing Or refreshBPO Then
try {
bpo = (Request.QueryString["RequestID"]);
}
catch (Exception ex) {
Session["exceptionMessage"] = ex.Message;
DisplayError("LoadBPO\\", (ex.Source + (" " + ex.Message)));
return false;
}
// Session("bpo") = bpo
// Else
// bpo = Session("bpo")
// If Not bpo.BPOID = Request.QueryString("RequestID") Then
// Try
// bpo = New bpoInfo(Request.QueryString("RequestID"))
// Catch ex As Exception
// Session("exceptionMessage") = ex.Source + " " + ex.Message
// DisplayError("LoadBPO\", ex.Source + " " + ex.Message)
// Return False
// End Try
// Session("bpo") = bpo
// End If
// End If
return true;
}
private void loadControls() {
// we load/unload screen by visual grouping/order
LoadPropertyInfo();
LoadPropertyCharacteristics();
LoadComps();
}
void LoadComps() {
LoadSale1();
LoadSale2();
LoadSale3();
LoadList1();
LoadList2();
LoadList3();
}
void SaveComps() {
private string Result;
private string Source;
if (!SaveSale1(Result)) {
Source = "Save Sale 1: ";
DisplayError(Source, Result);
}
// sale 1
if (!SaveSale2(Result)) {
Source = "Save Sale 2: ";
DisplayError(Source, Result);
}
// sale 2
if (!SaveSale3(Result)) {
Source = "Save Sale 3: ";
DisplayError(Source, Result);
}
// sale 3
if (!SaveList1(Result)) {
Source = "Save List 1: ";
DisplayError(Source, Result);
}
// list 1
if (!SaveList2(Result)) {
Source = "Save List 2: ";
DisplayError(Source, Result);
}
// list 2
if (!SaveList3(Result)) {
Source = "Save List 3: ";
DisplayError(Source, Result);
}
// list 3
}
}
I can not seem to find the cause, any help would be appreciated
Reply
Answers (
3
)
VB Translation
vb.net to c# translator?