Click here to Skip to main content
15,888,193 members
Home / Discussions / C#
   

C#

 
AnswerRe: Socket Connection Pin
Member 7906565-Aug-10 2:28
Member 7906565-Aug-10 2:28 
GeneralRe: Socket Connection Pin
Agweet5-Aug-10 3:58
Agweet5-Aug-10 3:58 
QuestionHow to Call a Server side Function on the Client side Pin
Vimalsoft(Pty) Ltd4-Aug-10 22:04
professionalVimalsoft(Pty) Ltd4-Aug-10 22:04 
AnswerRe: How to Call a Server side Function on the Client side Pin
Prosanta Kundu online4-Aug-10 22:40
Prosanta Kundu online4-Aug-10 22:40 
GeneralRe: How to Call a Server side Function on the Client side Pin
Vimalsoft(Pty) Ltd4-Aug-10 23:52
professionalVimalsoft(Pty) Ltd4-Aug-10 23:52 
GeneralRe: How to Call a Server side Function on the Client side Pin
Pete O'Hanlon5-Aug-10 0:07
mvePete O'Hanlon5-Aug-10 0:07 
GeneralRe: How to Call a Server side Function on the Client side Pin
Vimalsoft(Pty) Ltd5-Aug-10 0:16
professionalVimalsoft(Pty) Ltd5-Aug-10 0:16 
GeneralRe: How to Call a Server side Function on the Client side Pin
Pete O'Hanlon5-Aug-10 1:31
mvePete O'Hanlon5-Aug-10 1:31 
That's because a script method doesn't return like this. What you need to do is supply a callback function which your javascript executes. Here's a sample page:
HTML
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title>Untitled Page</title>
  <script>
    function keyPress()
    {
      var tb = document.getElementById('Text1');
      if (tb.value.length == 2)
        PageMethods.Getadata(tb.value, myFunction);
      return false;
    }
    function myFunction(msg)
    {
		alert(msg);
    }
  </script>
</head>
<body>
  <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="True" />
    <div>
      <input type="text" id="Text1" onkeypress="keyPress()" />
    </div>
  </form>
</body>
</html>

"WPF has many lovers. It's a veritable porn star!" - Josh Smith

As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.


My blog | My articles | MoXAML PowerToys | Onyx



GeneralRe: How to Call a Server side Function on the Client side Pin
Vimalsoft(Pty) Ltd5-Aug-10 20:16
professionalVimalsoft(Pty) Ltd5-Aug-10 20:16 
GeneralRe: How to Call a Server side Function on the Client side Pin
Vimalsoft(Pty) Ltd6-Aug-10 22:07
professionalVimalsoft(Pty) Ltd6-Aug-10 22:07 
QuestionCant find BannerBitmap property ( win form setup creation ) Pin
Krishna Varadharajan4-Aug-10 21:55
Krishna Varadharajan4-Aug-10 21:55 
AnswerRe: Cant find BannerBitmap property ( win form setup creation ) Pin
freakyit5-Aug-10 1:56
freakyit5-Aug-10 1:56 
AnswerRe: Cant find BannerBitmap property ( win form setup creation ) Pin
GenJerDan5-Aug-10 8:33
GenJerDan5-Aug-10 8:33 
QuestionHow do I include textbox data in SQL query? Pin
Joe Stansfield4-Aug-10 20:44
Joe Stansfield4-Aug-10 20:44 
AnswerRe: How do I include textbox data in SQL query? Pin
JHizzle4-Aug-10 21:55
JHizzle4-Aug-10 21:55 
GeneralRe: How do I include textbox data in SQL query? Pin
Joe Stansfield10-Aug-10 14:01
Joe Stansfield10-Aug-10 14:01 
AnswerRe: How do I include textbox data in SQL query? Pin
Pete O'Hanlon5-Aug-10 0:19
mvePete O'Hanlon5-Aug-10 0:19 
AnswerRe: How do I include textbox data in SQL query? Pin
PIEBALDconsult5-Aug-10 3:08
mvePIEBALDconsult5-Aug-10 3:08 
AnswerMessage Removed Pin
5-Aug-10 3:40
brunoseixas5-Aug-10 3:40 
GeneralRe: How do I include textbox data in SQL query? Pin
Pete O'Hanlon5-Aug-10 11:42
mvePete O'Hanlon5-Aug-10 11:42 
QuestionUrgent Pin
S.Bharath Ram4-Aug-10 16:57
S.Bharath Ram4-Aug-10 16:57 
AnswerRe: Urgent Pin
Yusuf4-Aug-10 17:44
Yusuf4-Aug-10 17:44 
AnswerRe: Urgent Pin
Prosanta Kundu online4-Aug-10 20:33
Prosanta Kundu online4-Aug-10 20:33 
AnswerRe: Urgent Pin
Abhinav S4-Aug-10 20:34
Abhinav S4-Aug-10 20:34 
GeneralRe: Urgent Pin
Keith Barrow4-Aug-10 21:15
professionalKeith Barrow4-Aug-10 21:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.