Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am building an auction site in 3-tier architecture.I have a method which is defined in AuctionHub.cs as follows:

C#
public BAL.LiveAuctionBAL AuctionBid(string Lot_Id, string InputAmt, string vendorid, string V_AuctionID, string AddModBy, string OpenBidAmt, string Decrementbid, string LastBidAmount, string auctionEndTimer)
{
BAL.LiveAuctionBAL BAL = new BAL.LiveAuctionBAL();
string result = "";
string msg = "", message = "";
try
{
BAL.Auction_Id = Convert.ToInt32(V_AuctionID);
BAL.Lot_Id = Convert.ToInt32(Lot_Id);
BAL.Vendor_Id = Convert.ToInt32(vendorid);
BAL.Bid_Amount = Convert.ToDouble(InputAmt);
if (auctionEndTimer != "")
{
BAL.AuctionEndTimer = DateTime.Parse(auctionEndTimer.ToString());
}
else
{
BAL.AuctionEndTimer = Convert.ToDateTime("01/01/1900");
}
BAL.AddMod_By = AddModBy;
result = BAL.AddAuctionBid();
if (result != "")
{
msg = result;
}
}
catch
{
}
return BAL;
}


now I am calling this method at client side as follows:
JavaScript
jq(function () {
jq.connection.hub.start().done(function () {
chat.server.auctionbid(Lot_Id, InputAmt, vendorid, V_AuctionID, AddModBy, OpenBidAmt, Decrementbid, LastBidAmount, auctionEndTimer);
}


but its not working...please help me with this.Its very urgent for me..Thanks in advance
Posted
Updated 7-Jul-15 22:28pm
v2

1 solution

You can use below code at client side
PHP
var NotificationConnection;
$(document).ready(function () {
    try {
        NotificationConnection = $.connection.Notification;
        NotificationConnection.client.UpdateUnreadCountClient = function (objCount) {
        }
        $.connection.hub.logging = false;
        $.connection.hub.start().done().fail(function (reason) {
            console.log("SignalR connection failed: " + reason);
        });
    }
    catch (error) { }
});

Which call a class having hub attribute with name Notification
and for class code first you have to share your complete code with class structure, so that i can find out problem in your code
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900