javascript - SignalR proxy is undefined -
why $.connection.connectionhub
undefined, using webform.
<script src="/scripts/jquery-1.6.4.min.js" "></script> <!--reference signalr library. --> <script src="/scripts/jquery.signalr-2.2.1.min.js"></script> <!--reference autogenerated signalr hub script. --> <script src="/signalr/signalr/hubs"></script> <!--add script update page , send messages.--> <script type="text/javascript"> $(function () { $.connection() // why undefined var chat = $.connection.connectionhub;
---------------------------hub class------------------------------
public class connectionhub : microsoft.aspnet.signalr.hub { public void hello() { clients.all.hello(); } public void sendmessage() { } }
------------------------scripts----------------------------------
i have found solution, not satisfy behavior of code? 1 can elaborate it?
when write below code works fine
var hubb = $.connection.connectionhub;
when write code //only h small can't work var hubb = $.connection.connectionhub;
can 1 explain logic here??
snap shot of code
Comments
Post a Comment