• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 759
  • Last Modified:

Message "; expected" when I go to a page

https://test1.campuswebstore.com/advPayment.aspx

Says "; expected":


How might I troubleshoot this?

I put some logging information in the Page_Load (to see if I get that far) and the log entry is not created...so I don't even think I am making it to Page Load.


In the markup, it is the TOP line that is underlined in RED and when I hover over the red line with my cursor it says "; expected" just like at runtime.


Here is the markup:
<%@ Page Language="C#" AutoEventWireup="true" Inherits="advPayment" Codebehind="advPayment.aspx.cs" %>

<%@ MasterType TypeName="Campus_Webstore.SiteWideMaster.TCSMasterBase" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="atlasToolkit" %>
<%@ Register Src="UserControls/OrderSummery.ascx" TagName="OrderSummery" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script type="text/javascript" language="javascript">
        function ClickHiddenDept() {
            $('ctl00_ContentPlaceHolder1_btnCleanResults').click();

        }
        function onUpdating() {
            // get the update progress div
            var updateProgressDiv = $get('updateProgressDiv');
            // make it visible
            updateProgressDiv.style.display = '';

            //  get the gridview element        
            var gridView = $get('<%= this.progpaypanel.ClientID %>');

            // get the bounds of both the gridview and the progress div
            var gridViewBounds = Sys.UI.DomElement.getBounds(gridView);
            var updateProgressDivBounds = Sys.UI.DomElement.getBounds(updateProgressDiv);

            //    do the math to figure out where to position the element (the center of the gridview)
            var x = gridViewBounds.x + Math.round(gridViewBounds.width / 2) - Math.round(updateProgressDivBounds.width / 2);
            var y = gridViewBounds.y + Math.round(gridViewBounds.height / 2) - Math.round(updateProgressDivBounds.height / 2);

            //    set the progress element to this position
            Sys.UI.DomElement.setLocation(updateProgressDiv, x, y);
        }

        function onUpdated() {
            // get the update progress div
            var updateProgressDiv = $get('updateProgressDiv');
            // make it invisible
            updateProgressDiv.style.display = 'none';
        }
    
    </script>

    <meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
    <table cellpadding="2" cellspacing="2" border="0" width="100%">
        <tr>
            <td align="center">
                <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/ProgressPayment.png" />
                <br />
                <br />
            </td>
        </tr>
    </table>
    <table cellpadding="2" cellspacing="2" border="0" width="100%">
        <tr>
            <td width="65%" valign="top">
                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                    <tr>
                        <td class="addOtherAddressHeader" valign="top" style="padding-top: 4px;">
                            <asp:Label EnableViewState="false" ID="Label2" runat="server" Style="font-size: 1.3em; font-weight: bold;
                                font-family: Verdana;">&nbsp;Payment Details</asp:Label><br />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <br />
                            Please select your method of payment. Read the return/checkout policy below and
                            be sure to check the "I Agree" box. Also note: Your card will not be charged until
                            your order is processed in the store. If you have multiple shipping methods, you
                            will see mutiple charges on your card, one for each ship method.<br />
                            <br />
                        </td>
                    </tr>
                    <tr>
                        <td class="addOtherAddressHeader" valign="top" style="padding-top: 4px;">
                            <asp:Label EnableViewState="false" ID="Label3" runat="server" Style="font-size: 1.3em; font-weight: bold;
                                font-family: Verdana;">&nbsp;Checkout Policy</asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <br />
                            <asp:Panel runat="server" ID="CheckoutPolicyTextBox">
                                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                    <tr>
                                        <td valign="top">
                                            <asp:TextBox TextMode="MultiLine" runat="server" ID="tbCheckoutPolicy" Width="99%"
                                                Height="240" ReadOnly="true" CssClass="inputstyle"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="alignright" valign="top">
                                            <asp:CheckBox ID="cbCheckoutPolicyIagree" Font-Size="12px" runat="server" Text="I Agree" />
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>
                        </td>
                    </tr>
                </table>
            </td>
            <td width="1%">
            </td>
            <td width="34%" valign="top">
                <uc1:OrderSummery ID="OrderSummery1" runat="server" />
                <br />
                <asp:Panel ID="panelPayment" runat="server" Height="100%">
                    <table cellpadding="0" cellspacing="0" border="0" width="215">
                        <tr>
                            <td align="left" class="addOtherAddressHeader" style="padding-top: 4px;">
                                <asp:Label EnableViewState="false" ID="Label1" runat="server" Style="font-size: 1.3em; font-weight: bold;
                                    font-family: Verdana;">&nbsp;Payment Information</asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <table border="0" cellpadding="0" cellspacing="5" class="AdvPaymentBox">
                                    <tr>
                                        <td class="textalignleft">
                                            <asp:Label EnableViewState="false" ID="lblPayCardType" runat="server" Text="Type: "> </asp:Label>
                                        </td>
                                        <td class="textalignright">
                                            <asp:DropDownList ID="dlPayCardType" runat="server" OnSelectedIndexChanged="dlPayCardType_SelectedIndexChanged"
                                                Width="126px">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="textalignleft">
                                            <asp:Label EnableViewState="false" ID="lblPayCardNumber" runat="server" Text="Card #: "></asp:Label>
                                        </td>
                                        <td class="textalignright">
                                            <asp:RequiredFieldValidator ID="reqCreditCardNum" runat="server" ControlToValidate="tbPayCCNumber"
                                                Display="none" ErrorMessage="&lt;b&gt;Required Field:&lt;/b&gt;&lt;br /&gt;Credit Card number is required."></asp:RequiredFieldValidator>
                                            <atlasToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender12" runat="server"
                                                HighlightCssClass="validatorCalloutHighlight" TargetControlID="reqCreditCardNum">
                                            </atlasToolkit:ValidatorCalloutExtender>
                                            <asp:TextBox ID="tbPayCCNumber" runat="server" autocomplete="off" AutoCompleteType="Disabled"
                                                CausesValidation="true" Width="120px"></asp:TextBox>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="tbPayCCNumber"
                                                Display="none" ErrorMessage="Number is Invalid" ValidationExpression="^3(?:[47]\d([ -]?)\d{4}(?:\1\d{4}){2}|0[0-5]\d{11}|[68]\d{12})$|^4(?:\d\d\d)?([ -]?)\d{4}(?:\2\d{4}){2}$|^6011([ -]?)\d{4}(?:\3\d{4}){2}$|^5[1-5]\d\d([ -]?)\d{4}(?:\4\d{4}){2}$|^2014\d{11}$|^2149\d{11}$|^2131\d{11}$|^1800\d{11}$|^3\d{15}$ "></asp:RegularExpressionValidator>
                                            <atlasToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server"
                                                HighlightCssClass="validatorCalloutHighlight" TargetControlID="RegularExpressionValidator1">
                                            </atlasToolkit:ValidatorCalloutExtender>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="textalignleft">
                                            <asp:Label EnableViewState="false" ID="lblPayExpMonth" runat="server" Text="Exp Date: "></asp:Label>
                                        </td>
                                        <td class="textalignright">
                                            <asp:DropDownList ID="dlPayexpMonth" runat="server" Font-Size="10px">
                                                <asp:ListItem Value="01">01 - Jan</asp:ListItem>
                                                <asp:ListItem Value="02">02 - Feb</asp:ListItem>
                                                <asp:ListItem Value="03">03 - Mar</asp:ListItem>
                                                <asp:ListItem Value="04">04 - Apr</asp:ListItem>
                                                <asp:ListItem Value="05">05 - May</asp:ListItem>
                                                <asp:ListItem Value="06">06 - Jun</asp:ListItem>
                                                <asp:ListItem Value="07">07 - Jul</asp:ListItem>
                                                <asp:ListItem Value="08">08 - Aug</asp:ListItem>
                                                <asp:ListItem Value="09">09 - Sep</asp:ListItem>
                                                <asp:ListItem Value="10">10 - Oct</asp:ListItem>
                                                <asp:ListItem Value="11">11 - Nov</asp:ListItem>
                                                <asp:ListItem Value="12">12 - Dec</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:DropDownList ID="dlPayexpYear" runat="server" Font-Size="10px">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="textalignleft">
                                            <asp:Label EnableViewState="false" ID="lblCID1" runat="server" Text="CID"></asp:Label>
                                        </td>
                                        <td class="textalignright">
                                            <asp:RequiredFieldValidator ID="reqCIDNumber" runat="server" ControlToValidate="tbPayCIDNumber"
                                                Display="none" ErrorMessage="&lt;b&gt;Required Field:&lt;/b&gt;&lt;br /&gt;A CID Number is required. For help, click the question icon"></asp:RequiredFieldValidator>
                                            <atlasToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server"
                                                HighlightCssClass="validatorCalloutHighlight" TargetControlID="reqCIDNumber">
                                            </atlasToolkit:ValidatorCalloutExtender>
                                            <asp:TextBox ID="tbPayCIDNumber" runat="server" Width="105px"></asp:TextBox>
                                            <asp:Image ID="ibPayCIDHelp" runat="server" ImageUrl="~/Images/question1.gif" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="textalignleft">
                                            <asp:Label EnableViewState="false" ID="Label6" runat="server" Text="Promo Code:"></asp:Label>
                                        </td>
                                        <td class="textalignright">
                                            <asp:TextBox ID="tbPromoCode" runat="server" Width="120px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
    </table>
    <table cellpadding="3" cellspacing="3" border="0" width="94%">
        <tr>
            <td align="right">
                <asp:UpdatePanel ID="upcheckout" runat="server" UpdateMode="always">
                    <ContentTemplate>
                        <atlas:UpdateProgress runat="server" ID="UpdateProgress1" DynamicLayout="false">
                            <ProgressTemplate>
                                <img src="../App_Themes/<% Page.StyleSheetTheme %>/Images/ajax-loader.gif" />
                                <b>Validating Payment Information...</b><br />
                            </ProgressTemplate>
                        </atlas:UpdateProgress>
                        <asp:Panel ID="progpaypanel" runat="Server">
                            <asp:Button ID="btnPaySubmit" runat="server" Text="Make Payment" CssClass="CheckoutButtons"
                                Visible="true" OnClick="btnPaymentSubmit_Click" CausesValidation="true" UseSubmitBehavior="true" /><br />
                            <br />
                            <div style="display: none">
                                <asp:Label EnableViewState="false" ID="lblInfoMessage" runat="server" Text="Please Read The Checkout Policy and Agree"
                                    ForeColor="red" Font-Size="14pt" Font-Bold="true" Visible="false"></asp:Label>
                            </div>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
    </table>
    <div id="updateProgressDiv" style="display: none; height: 40px; width: 40px">
        <img src="Images/Green_Loading.gif" />
    </div>
    <asp:Panel ID="panelModalError" runat="server" CssClass="modalPopups" Width="200"
        Height="100" Style="display: none">
        <div class="news" id="Div1">
            <table cellpadding="0" cellspacing="0" border="0" class="modalsErrorBackground" width="200"
                height="100">
                <tr>
                    <td class="modalsErrorBackground" valign="top">
                        <table cellpadding="0" cellspacing="0" border="0" width="100%">
                            <tr>
                                <td width="65%" style="text-align: center;" valign="top">
                                    <font size="4">ERROR</font>
                                </td>
                                <td width="35%" class="alignright" valign="top">
                                    <asp:ImageButton ID="imgModalError" runat="server" ImageUrl="~/Images/closetrans.gif" />
                                </td>
                            </tr>
                        </table>
                        <asp:UpdatePanel ID="upModalError" runat="server" UpdateMode="always">
                            <ContentTemplate>
                                <center>
                                    <br />
                                    <br />
                                    <table cellpadding="0" cellspacing="0" border="0">
                                        <tr>
                                            <td valign="top">
                                                <asp:Image ImageUrl="~/Images/error.gif" runat="server" ID="errimage" />
                                            </td>
                                            <td valign="middle">
                                                <asp:Label EnableViewState="false" Font-Size="Medium" ID="lblModalError" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                    <br />
                                </center>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                        <center>
                            <div style="display: none">
                                <asp:Button ID="Button5" runat="server" Text="OK"></asp:Button>
                                <asp:Button ID="Button6" runat="server" Text="Ok"></asp:Button></div>
                        </center>
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
    <atlasToolkit:UpdatePanelAnimationExtender ID="upae" BehaviorID="animation" runat="server"
        TargetControlID="upcheckout">
        <Animations>
                    <OnUpdating>
                        <Parallel duration="0">
                            <%-- place the update progress div over the gridview control --%>
                            <%--<ScriptAction Script="onUpdating();" />--%>  
                            <%-- disable the search button --%>                       
                            <EnableAction AnimationTarget="btnPaySubmit" Enabled="false" />
                            <%-- fade-out the GridView --%>
                            <FadeOut minimumOpacity=".5" />
                         </Parallel>
                    </OnUpdating>
                    <OnUpdated>
                        <Parallel duration="0">
                            <%-- fade back in the GridView --%>
                            <FadeIn minimumOpacity=".5" />
                            <%-- re-enable the search button --%>  
                            <EnableAction AnimationTarget="btnPaySubmit" Enabled="true" />
                            <%--find the update progress div and place it over the gridview control--%>
                           <%-- <ScriptAction Script="onUpdated();" /> --%>
                        </Parallel> 
                    </OnUpdated>
        </Animations>
    </atlasToolkit:UpdatePanelAnimationExtender>
    <asp:Button runat="server" ID="hiddenTargetControlForModalPopup1" Style="display: none" />
    <atlasToolkit:ModalPopupExtender runat="server" ID="modalError" BehaviorID="modalErrorPanelBehavior"
        TargetControlID="hiddenTargetControlForModalPopup1" PopupControlID="panelModalError"
        BackgroundCssClass="modalBackground" DropShadow="false" RepositionMode="RepositionOnWindowScroll">
    </atlasToolkit:ModalPopupExtender>
</asp:Content>

Open in new window




Here is the code behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using IWEB;
using SierraBravo.PickDB;
using System.Data;
using System.Xml;
using IWEB.Connector;
using Campus_Webstore;

    public partial class advPayment : Campus_Webstore.BaseMainConfigAdmin
    {
        protected void Page_PreInit(object sender, System.EventArgs e)
        {
            this.MasterPageFile = "~/contentfiles/" + Page.StyleSheetTheme + "/TCSSite.Master";
        } 
        
        protected void Page_Load(object sender, EventArgs e)
        {
            GlobalMethods.QuickLog("", "top of page load in advPayment");


            if (Session["CART"] == null)
            {
                Response.Redirect("~/Default.aspx");
            }
            OrderSummery1.ShowShippingInfo();
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            string thisURL = Page.Request.CurrentExecutionFilePath.ToString();
            string usehttps = System.Configuration.ConfigurationManager.AppSettings["USEHTTPS"] as string;
            string serverName = HttpUtility.UrlEncode(Request.ServerVariables["SERVER_NAME"]);
            string vdirName = Request.ApplicationPath;
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            if (Session["USERINFO"] == null)
            {

                Response.Redirect(GlobalMethods.PerformRedirect(System.Configuration.ConfigurationManager.AppSettings["USEHTTPS"] as string,
    HttpUtility.UrlEncode(Request.ServerVariables["SERVER_NAME"]),
    HttpUtility.UrlEncode(Request.ServerVariables["SERVER_PORT"]),
    "login.aspx?ReturnURL=" + thisURL, Page.Request));



            }
            if (!Page.IsPostBack)
            {
                //dynamicly add years to drop down box
                IList<DateTime> Years = new List<DateTime>();
                //Years.Add(System.DateTime.Now.AddYears(0));
                for (int i = 0; i < 10; i++)
                {
                    Years.Add(System.DateTime.Now.AddYears(i));
                }
                dlPayexpYear.DataSource = Years;
                dlPayexpYear.DataTextField = "Year";
                dlPayexpYear.DataBind();

                DataTable myPaymentDT = Session["PAYMENTTYPES"] as DataTable;
                dlPayCardType.DataSource = myPaymentDT;
                dlPayCardType.DataTextField = "TYPE";
                dlPayCardType.DataValueField = "TENDER";
                dlPayCardType.DataBind();
                System.IO.TextReader sr = new System.IO.StreamReader(Server.MapPath("contentfiles/" + Page.StyleSheetTheme + "/checkoutpolicy.txt"));

                tbCheckoutPolicy.Text = sr.ReadToEnd();
                sr.Close();
            }
        }
        protected void dlPayCardType_SelectedIndexChanged(object sender, EventArgs e)
        {
        }
        protected void btnPaymentSubmit_Click(object sender, EventArgs e)
        {
            string payType = dlPayCardType.SelectedValue.ToString();
            switch (payType)
            {
                case "CC":
                    {
                        if (tbPayCCNumber.Text != "" || tbPayCIDNumber.Text != "")
                        {
                            TryPayment();
                        }
                    }
                    break;
                case "GC":
                    {
                        TryPayment();
                    }
                    break;
                case "FA":
                    {
                        TryPayment();
                    }
                    break;
                case "CA":
                    {
                        TryPayment();
                    }
                    break;

                case "NA":
                    {
                        lblModalError.Text = "Please select method of Payment.";
                        modalError.Show();
                        lblInfoMessage.Text = "Please select method of Payment.";
                        lblInfoMessage.Visible = true;
                    }
                    break;
                default:
                    {
                        lblModalError.Text = "There way a payment Selection error.";
                        modalError.Show();
                        lblInfoMessage.Text = "There way a payment Selection error.";
                        lblInfoMessage.Visible = true;

                    }
                    break;




            }
        }
        private void TryPayment()
        {
            try
            {
                if (cbCheckoutPolicyIagree.Checked)
                {
                    XmlDocument tmpDoc1 = new XmlDocument();
                    string subtotal, bill1, bill2, billzip, billstate, billcity;

                    DataTable tmpuserDT = Session["USERINFO"] as DataTable;

                    //subtotal = lblSubTotal.Text.Substring(1, lblSubTotal.Text.Length - 1);
                    bill1 = tmpuserDT.Rows[0].ItemArray.GetValue(3).ToString();
                    bill2 = tmpuserDT.Rows[0].ItemArray.GetValue(4).ToString();
                    billcity = tmpuserDT.Rows[0].ItemArray.GetValue(5).ToString();
                    billstate = tmpuserDT.Rows[0].ItemArray.GetValue(6).ToString();
                    billzip = tmpuserDT.Rows[0].ItemArray.GetValue(7).ToString();
                    string expdate = dlPayexpMonth.SelectedValue.ToString() + dlPayexpYear.SelectedValue.Substring(2, 2);
                    string merchid = System.Configuration.ConfigurationManager.AppSettings["MERCHID"] as string;
                    string merchuser = System.Configuration.ConfigurationManager.AppSettings["MERCHUSERID"] as string;
                    string custcode = System.Configuration.ConfigurationManager.AppSettings["MERCHCUSTCODE"] as string;
                    string merchpass = System.Configuration.ConfigurationManager.AppSettings["MERCHPASS"] as string;
                    string appsurl = System.Configuration.ConfigurationManager.AppSettings["APPSURL"] as string;

                    //need to build xml



                    if (IWEBConfigAdmin.ValidateCard)
                    {
                        TryToValidate(tmpDoc1, bill1, bill2, billzip, billstate, billcity, tmpuserDT, expdate, merchuser, custcode, merchpass, appsurl, merchid);
                    }
                    else
                    {
                        FinishOrder(tmpuserDT, expdate);
                    }




                }
                else
                {
                    lblModalError.Text = "Please read and agree to checkout policy.";
                    modalError.Show();
                    lblInfoMessage.Text = "Please read and agree to checkout policy.";
                    lblInfoMessage.Visible = true;
                    //checkout not checked

                }



            }
            catch (Exception ex)
            {
                lblModalError.Text = "There was a problem with your transaction. Please try again";

                modalError.Show();
                lblInfoMessage.Text = "There was a problem with your transaction. Please try again";
                lblInfoMessage.Visible = true;
                throw new ApplicationException("problem with card somewhere", ex);
            }
        }
        public XmlDocument GetCCAuth(XmlDocument xDoc, string URL)
        {
            try
            {
                // get the data from the xml document into a byte stream
                Byte[] bdata = System.Text.Encoding.UTF8.GetBytes(xDoc.OuterXml);
                // instantiate a web client
                System.Net.WebClient wc = new System.Net.WebClient();
                Byte[] bresp;
                // add appropriate headers
                wc.Headers.Add("Content-Type", "text/xml");
                // send data to server, and wait for a response
                bresp = wc.UploadData(URL, bdata);
                // read the response
                string resp = System.Text.Encoding.ASCII.GetString(bresp);
                XmlDocument xresp = new XmlDocument();
                xresp.LoadXml(resp);
                // return the xml document response from the server
                return xresp;
            }
            catch
            {
                // your error handler
                //SystemError();
                return null;
            }

        }
        private void TryToValidate(XmlDocument tmpDoc1, string bill1, string bill2, string billzip, string billstate, string billcity, DataTable tmpuserDT, string expdate, string merchuser, string custcode, string merchpass, string appsurl, string merchid)
        {
            //still need to find timeout value here and submit order but not with validation

            try
            {
                tmpDoc1.LoadXml("<?xml version=\"1.0\" encoding=\"UTF-8\"?><TLTransaction><TLRequest><UserCode>" + merchuser + "</UserCode><Password>" + merchpass + "</Password><CustCode>" + custcode + "</CustCode><MerchantID>" + merchid + "</MerchantID><AccountNumber>" + tbPayCCNumber.Text + "</AccountNumber><ExpireDate>" + expdate + "</ExpireDate><Amount>1.00</Amount><ValidAddressOnly>1</ValidAddressOnly><Date>" + System.DateTime.Today.ToShortDateString() + "</Date><BillAddress1>" + bill1 + "</BillAddress1><BillAddress2>" + bill2 + "</BillAddress2><BillCity>" + billcity + "</BillCity><BillState>" + billstate + "</BillState><BillZip>" + billzip + "</BillZip><CardID>" + tbPayCIDNumber.Text + "</CardID><Method>A</Method></TLRequest></TLTransaction>");

                XmlDocument ccdoc = GetCCAuth(tmpDoc1, appsurl);

                System.Data.DataSet tmpDS = new DataSet();
                System.IO.StringReader stream;
                stream = new System.IO.StringReader(ccdoc.InnerXml);
                tmpDS.ReadXml(stream);
                int verified = Convert.ToInt16(tmpDS.Tables["TLResponse"].Rows[0].ItemArray.GetValue(0).ToString());
                string errormsg;
                if (verified == 1)
                {
                    //credit card is valid
                    FinishOrder(tmpuserDT, expdate);

                }
                else
                {
                    //credit card is no good!
                    string errorcode = tmpDS.Tables["TLResponse"].Rows[0]["MessageCode"].ToString();
                    switch (errorcode)
                    {
                        case "D101":
                            {
                                errormsg = "Process Timed out"; //but we should just send the order anyway
                                FinishOrder(tmpuserDT, expdate);
                                lblModalError.Text = errormsg;
                                modalError.Show();
                                lblInfoMessage.Text = errormsg;
                                lblInfoMessage.Visible = true;
                            }
                            break;

                        default:
                            {
                                errormsg = tmpDS.Tables["TLResponse"].Rows[0].ItemArray.GetValue(1).ToString();
                                lblModalError.Text = errormsg;
                                modalError.Show();
                                lblInfoMessage.Text = errormsg;
                                lblInfoMessage.Visible = true;
                            }
                            break;
                    }


                }
            }
            catch
            {
                FinishOrder(tmpuserDT, expdate); // something happend when we tried to validate. we still need to finish the order or the user will be stuck

            }
        }

        private void FinishOrder(DataTable tmpuserDT, string expdate)
        {
            string userID = tmpuserDT.Rows[0].ItemArray.GetValue(0).ToString();
            string storeid = System.Configuration.ConfigurationManager.AppSettings["StoreNumber"] as string;


            connectToDB myDB = new connectToDB();
            object myObject = new
            {
                PAYTYPE = dlPayCardType.SelectedValue,
                PROMOCODE = tbPromoCode.Text,
                EXPDATE = expdate,
                CARDID = tbPayCIDNumber.Text,
                CARDNUMBER = tbPayCCNumber.Text,
                USERID = userID,
                CONFNUMBER = Session["CONFNUMBER"].ToString(),
                STOREID = storeid
            };

            string strPickDataReturn = myDB.getStringResult(Convert.ToInt32(storeid), "IWEB.PAYMENT", myObject);


            XmlDocument doc = new XmlDocument();
            string test = strPickDataReturn; 
            string debugvalue = System.Configuration.ConfigurationManager.AppSettings["DEBUG"] as string; 
            
            if (debugvalue == "TRUE") 
            { 
                //IWEB.Emailer.eMail.SendMail("TCSMail@total-computing.com", "TCSMail@total-computing.com", Page.StyleSheetTheme + " - XML REPORT from advPayment.aspx - FinishOrder method", test, "Tom TEST", false); 
            }
            
            System.Data.DataSet taxPaymentDS = new DataSet();

            try
            {

                doc.LoadXml(strPickDataReturn);
                System.IO.StringReader ccstream;
                ccstream = new System.IO.StringReader(doc.InnerXml);
                taxPaymentDS.ReadXml(ccstream);




            }
            catch (Exception ex)
            {
                throw new ApplicationException("problem parsing xml - checkout.aspx iweb.payment xml= " + test, ex);
            }
            if (taxPaymentDS != null && taxPaymentDS.Tables[0].TableName != "ERRORS")
            {
                try
                {

                    DataTable tmpOrderNumber = taxPaymentDS.Tables[1] as DataTable;
                    string ordernumber = tmpOrderNumber.Rows[0].ItemArray.GetValue(0).ToString();
                    string strEmailAddress = tmpOrderNumber.Rows[0].ItemArray.GetValue(1).ToString(); //get the emails for the store in question

                    Session["ADMINEMAILADDRESSLIST"] = strEmailAddress;
                    Session["TMPORDERNUMBER"] = ordernumber;
                    Session["SHIPSELECTED"] = null;
                    Master.CalcCartTotal();
                  
                    Response.Redirect(GlobalMethods.PerformRedirect(System.Configuration.ConfigurationManager.AppSettings["USEHTTPS"] as string,
  HttpUtility.UrlEncode(Request.ServerVariables["SERVER_NAME"]),
  HttpUtility.UrlEncode(Request.ServerVariables["SERVER_PORT"]),
  "orderdone.aspx", Page.Request));





                }
                catch (Exception ex)
                {
                    throw new ApplicationException("problem loading gridviews - iweb.payment - checkout.aspx - xml= " + test, ex);
                }
            }
            else
            {
                string errMsg = taxPaymentDS.Tables[0].Rows[0].ItemArray.GetValue(0).ToString();
                btnPaySubmit.Enabled = true;
                lblModalError.Text = errMsg;
                lblInfoMessage.Text = errMsg;
                lblInfoMessage.Visible = true;
                modalError.Show();
            }
        }
        private void GetCCTypes(string selectedtype)
        {
            switch (selectedtype)
            {
                case "Visa":
                    {
                        RegularExpressionValidator1.ValidationExpression = "^([4]{1})([0-9]{12,15})$";
                    }
                    break;
                case "Mastercard":
                    {
                        RegularExpressionValidator1.ValidationExpression = "^([51|52|53|54|55]{2})([0-9]{14})$";
                    }
                    break;
                case "Discover Card":
                    {
                        RegularExpressionValidator1.ValidationExpression = "(^(6011)\\d{12}$)|(^(65)\\d{14}$)";
                    }
                    break;
                case "American Express":
                    {
                        RegularExpressionValidator1.ValidationExpression = "(^3[47])((\\d{11}$)|(\\d{13}$))";
                    }

                    break;
                default:
                    {
                        RegularExpressionValidator1.ValidationExpression = "^3(?:[47]\\d([ -]?)\\d{4}(?:\\1\\d{4}){2}|0[0-5]\\d{11}|[68]\\d{12})$|^4(?:\\d\\d\\d)?([ -]?)\\d{4}(?:\\2\\d{4}){2}$|^6011([ -]?)\\d{4}(?:\\3\\d{4}){2}$|^5[1-5]\\d\\d([ -]?)\\d{4}(?:\\4\\d{4}){2}$|^2014\\d{11}$|^2149\\d{11}$|^2131\\d{11}$|^1800\\d{11}$|^3\\d{15}$ ";
                    }
                    break;
            }
        }
    }

Open in new window










Here is the text copied off the error message page:
Server Error in '/' Application.
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:

[No relevant source lines]


Source File: c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\App_Web_advpayment.aspx.cdcab7d2.ehvzbhqd.0.cs    Line: 1961


Show Detailed Compiler Output:

C:\Windows\SysWOW64\inetsrv> "C:\Windows\Microsoft.NET\Framework\v3.5\csc.exe" /t:library /utf8output /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\8b7052ac\9db83e1c_2f10cc01\CWSConfig.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\29d60e7a\0046390e_9169cb01\DataCalendar.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Drawing.Design\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.Design.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\6a47d241\0046390e_9169cb01\AmazonAssociatesAPILinqtoXML.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\a1cd33a3\0046390e_9169cb01\Amazon4.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\7e1be5e9\004fb666_76a0cb01\com.flajaxian.FileUploader.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\df792150\a750701c_2f10cc01\IWEB.FileHandler.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\4c91b881\0046390e_9169cb01\SierraBravo.PickDB.UO.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\f43314ab\b272041f_2f10cc01\Campus Webstore.XmlSerializers.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\8c80930d\00aaa128_a4fcca01\Brettle.Web.NeatUpload.GreyBoxProgressBar.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\deae6edc\00c98b57_859cc601\App_Licenses.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\2f03372f\0046390e_9169cb01\MAX.USPS.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\8604e701\00aaa128_a4fcca01\Brettle.Web.NeatUpload.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\26ebe580\0046390e_9169cb01\Telerik.Web.UI.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\1465d9bb\0035c5f7_f9baca01\SierraBravo.PickDB.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\a5382357\00ac0dd9_08a1c601\AtlasControlToolkit.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\e26c5e7b\00cfa45c_9120c701\Components4U.Web.MultipleFileUploader.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\04719208\b8d4b41c_2f10cc01\IWeb Connector.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\9e8e9b82\0046390e_9169cb01\Telerik.Web.Design.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\18d31621\00aaa128_a4fcca01\Brettle.Web.NeatUpload.HashedInputFile.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Extensions.Design\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.Design.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\App_Web_rsvoxclu.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\58733936\0046390e_9169cb01\PickDB.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\68b96c65\00f91872_5accc601\UrlRewritingNet.UrlRewriter.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\451097ca\0084229d_7543ca01\App_Code.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\79c88a00\0046390e_9169cb01\DZoft.dBug.TCS.PickDL.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\dba1fa72\0046390e_9169cb01\UODOTNET.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\8ecfe490\0046390e_9169cb01\Bright.WebControls.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\e820731e\0046390e_9169cb01\AjaxControlToolkit.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Design\2.0.0.0__b03f5f7f11d50a3a\System.Design.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\368b59ff\0046390e_9169cb01\Chaliy.Web.UI.UpdatableXmlDataSource.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\c9a7bc14\000bc736_4e52c801\DZoft.DL.General.SoapTraceSoapExtension.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\61454853\0084229d_7543ca01\App_global.asax.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\0fde0c75\0046390e_9169cb01\FedExRates.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\5f927fa3\00608ced_b39fc601\log4net.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\c92ec3ed\00aaa128_a4fcca01\Hitone.Web.SqlServerUploader.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\52b04ca4\0057f19b_7543ca01\App_WebReferences.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\70d3c22e\0046390e_9169cb01\FlashUpload.DLL" /R:"C:\Windows\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\eeb7031d\0067e152_eb1ec701\AJAXExtensionsToolbox.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\c2efcaff\0046390e_9169cb01\Utilities.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\8e9eb6f8\00872636_0484c901\UODOTNET4CF.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\207f9ff5\f7009b1e_2f10cc01\Campus Webstore.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\b66c8a03\6dee9993_9b0ecc01\sstchur.web.survey.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\assembly\dl3\8ed0954f\0046390e_9169cb01\FreeTextBox.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /out:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\App_Web_advpayment.aspx.cdcab7d2.ehvzbhqd.dll" /debug- /optimize+ /win32res:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\durxnqlq.res" /w:4 /nowarn:1659;1699;1701 /warnaserror-  "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\App_Web_advpayment.aspx.cdcab7d2.ehvzbhqd.0.cs" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\App_Web_advpayment.aspx.cdcab7d2.ehvzbhqd.1.cs"


Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.4926
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.

c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\App_Web_advpayment.aspx.cdcab7d2.ehvzbhqd.0.cs(1961,17): error CS1002: ; expected
c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\App_Web_advpayment.aspx.cdcab7d2.ehvzbhqd.0.cs(1961,17): error CS1525: Invalid expression term '.'
c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3ff6dd3e\efbe97b6\App_Web_advpayment.aspx.cdcab7d2.ehvzbhqd.0.cs(1961,18): error CS1002: ; expected



Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927 

Open in new window

0
Tom Knowlton
Asked:
Tom Knowlton
  • 3
1 Solution
 
Tom KnowltonWeb developerAuthor Commented:
I may have found it:

If I comment-out this markup, the error goes away:

  <%-- <atlas:UpdateProgress runat="server" ID="UpdateProgress1" DynamicLayout="false">
                            <ProgressTemplate>
                                <img src="../App_Themes/<% Page.StyleSheetTheme %>/Images/ajax-loader.gif" />
                                <b>Validating Payment Information...</b><br />
                            </ProgressTemplate>
                        </atlas:UpdateProgress>--%>

Open in new window



I'll have to find a work-around, but that is not part of this question.
0
 
dejaanbuCommented:
try

Instead of
<img src="../App_Themes/<% Page.StyleSheetTheme %>/Images/ajax-loader.gif" />

change to

<img src="../App_Themes/<%=Page.StyleSheetTheme %>/Images/ajax-loader.gif" />
0
 
Tom KnowltonWeb developerAuthor Commented:
did not help, sorry.
0
 
Tom KnowltonWeb developerAuthor Commented:
thx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now