Codechef4u is a community for computer professionals,by computer professionals,just like you; who loves sharing and helping each others,Join them
Share your post

CS1026: ) expected ( button with ajax method call)

Facing following error with button, I used JavaScript Ajax method to cancel Approval.
Compiler Error Message: CS1026: ) expected

Source Code:


Line 99:  CommandName="Cancel"  Text="Cancel"  visible='<%# ShowCancelButton(Convert.ToString(Eval("Requester.FirstName"))) %>'/>--%>

Line 100:

Line 101: <asp:Button ID="CancelButton" runat="server" CssClass="wt-button" CausesValidation="False" OnClick=" CancelRequest(); return false;"

Line 102: CommandName="Cancel"  Text="Cancel" />

Line 103:



With server side asp: Button  compiler will throw this error, use server side HTML button instead.

Source Code should be:

  <input type="button" ID="CancelButton" runat="server" Css="cs-button" CausesValidation="False" OnClick="
CancelRequest(); return false;" CommandName="Cancel"  Text="Cancel"  visible="True"  />

The maximum message size quota for incoming messages (65536) has been exceeded.


System.ServiceModel.CommunicationException: The maximum message size quota for incoming messages (65536) has been exceeded.
To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.


You can set at web.config MaxReceivedMessageSize property to another value
You should set maxReceivedMessageSize="2147483647" to increase message size.

Try below changes in config file:

              <binding name="WsHttpBinding_IYourService" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647">
              <binding name="BasicHttpBinding_IYourService "maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
    <client />