Click here to Skip to main content
15,918,808 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionUrl Rewriting / Vanity url Pin
aroonthapa27-Mar-12 19:36
aroonthapa27-Mar-12 19:36 
Questionasp.net Pin
mla997427-Mar-12 17:57
mla997427-Mar-12 17:57 
AnswerRe: asp.net Pin
Not Active28-Mar-12 2:52
mentorNot Active28-Mar-12 2:52 
AnswerRe: asp.net Pin
Syed Zoheb Ali Sumair16-Apr-12 6:10
Syed Zoheb Ali Sumair16-Apr-12 6:10 
QuestionCountdown timer with updatepanel Pin
treuveni26-Mar-12 20:09
treuveni26-Mar-12 20:09 
AnswerRe: Countdown timer with updatepanel Pin
Joshua Omundson27-Mar-12 6:00
Joshua Omundson27-Mar-12 6:00 
GeneralRe: Countdown timer with updatepanel Pin
treuveni1-Apr-12 20:43
treuveni1-Apr-12 20:43 
AnswerRe: Countdown timer with updatepanel Pin
jkirkerx27-Mar-12 19:07
professionaljkirkerx27-Mar-12 19:07 
GeneralRe: Countdown timer with updatepanel Pin
treuveni1-Apr-12 20:45
treuveni1-Apr-12 20:45 
QuestionDeleting row of Grid on button click Pin
Chandan Aryan26-Mar-12 1:09
Chandan Aryan26-Mar-12 1:09 
AnswerRe: Deleting row of Grid on button click Pin
treuveni26-Mar-12 20:26
treuveni26-Mar-12 20:26 
GeneralRe: Deleting row of Grid on button click Pin
mla997427-Mar-12 18:01
mla997427-Mar-12 18:01 
AnswerRe: Deleting row of Grid on button click Pin
Raman Ghantiyala27-Mar-12 3:33
Raman Ghantiyala27-Mar-12 3:33 
AnswerRe: Deleting row of Grid on button click Pin
Sharad CG27-Mar-12 20:35
Sharad CG27-Mar-12 20:35 
AnswerRe: Deleting row of Grid on button click Pin
Anudeep Jaiswal - MCA28-Mar-12 22:57
Anudeep Jaiswal - MCA28-Mar-12 22:57 
QuestionTroubles with calling a PageMethod from javascript [solved] Pin
Calla25-Mar-12 23:07
Calla25-Mar-12 23:07 
I've been struggling with the same problem for a few days now without getting anywhere. In my aspx page I try to call a PageMethod from a javascript and then inserting the result of that call into a div.

MyPage.aspx
XML
<ajaxToolkit:ToolkitScriptManager runat="server" ID="ScriptManager1" EnablePageMethods="true">
   <Scripts>
      <asp:ScriptReference Path="~/javascript/myscript.js" />
   </Scripts>
</ajaxToolkit:ToolkitScriptManager>
...
...
<a href="javascript:myFunction();">Click to run script</a>
...
...
<div id='theDiv'></div>


MyPage.aspx.cs
C#
[System.Web.Services.WebMethod]
public static string ReturnTheString()
{
   return "This is the string returned";
}


And finally my javascript function where everything goes wrong myscript.js
JavaScript
function myFunction()
{
   PageMethods.ReturnTheString(OnSucceeded, OnFailed);
}

function OnSucceeded(result)
{
   var myDiv = document.getElementById('theDiv');
   myDiv.innerHTML = result;
}

function OnFailed(error)
{
   alert(error.get_message());
}


The problem is that I don't get the expexted "This is the string returned" as result in my OnSucceeded js function. And when I debug my website and set up a breakpoint in ReturnTheString() the code never runs.. My result parameter is sometimes just empty and sometimes has the value of almost my whole page (starting with

modified 27-Mar-12 2:51am.

AnswerRe: Troubles with calling a PageMethod from javascript Pin
Calla26-Mar-12 20:51
Calla26-Mar-12 20:51 
Questioncause of these errors? Pin
ozturkmuhammed24-Mar-12 12:11
ozturkmuhammed24-Mar-12 12:11 
AnswerRe: cause of these errors? Pin
Eddy Vluggen25-Mar-12 3:34
professionalEddy Vluggen25-Mar-12 3:34 
QuestionUpdatePanel with dropdown control. Pin
vipinkrr24-Mar-12 6:22
vipinkrr24-Mar-12 6:22 
AnswerRe: UpdatePanel with dropdown control. Pin
Abhinav S24-Mar-12 16:31
Abhinav S24-Mar-12 16:31 
AnswerRe: UpdatePanel with dropdown control. Pin
MaulikDusara26-Mar-12 2:55
MaulikDusara26-Mar-12 2:55 
Questionquiz application Pin
daya patel24-Mar-12 5:24
daya patel24-Mar-12 5:24 
AnswerRe: quiz application Pin
Abhinav S24-Mar-12 16:28
Abhinav S24-Mar-12 16:28 
Questionpaging in gridview? Pin
murali_utr23-Mar-12 23:47
murali_utr23-Mar-12 23:47 

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.