Click here to Skip to main content
15,887,135 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Checkbox in datagrid Pin
nagendrathecoder14-Apr-10 2:02
nagendrathecoder14-Apr-10 2:02 
GeneralRe: Checkbox in datagrid Pin
Morgs Morgan14-Apr-10 2:30
Morgs Morgan14-Apr-10 2:30 
GeneralRe: Checkbox in datagrid Pin
nagendrathecoder14-Apr-10 2:42
nagendrathecoder14-Apr-10 2:42 
QuestionResponse.Write in aspx file Pin
Abdul Rahman Hamidy13-Apr-10 18:17
Abdul Rahman Hamidy13-Apr-10 18:17 
AnswerRe: Response.Write in aspx file Pin
Viral Upadhyay13-Apr-10 19:26
Viral Upadhyay13-Apr-10 19:26 
AnswerRe: Response.Write in aspx file Pin
Martin Jarvis13-Apr-10 20:38
Martin Jarvis13-Apr-10 20:38 
GeneralRe: Response.Write in aspx file Pin
Abdul Rahman Hamidy16-Apr-10 18:37
Abdul Rahman Hamidy16-Apr-10 18:37 
QuestionError WebForm_InitCallback and WebForm_DoCallback is not defined Pin
Tridip Bhattacharjee13-Apr-10 8:21
professionalTridip Bhattacharjee13-Apr-10 8:21 
hi,

i have developed a simple form which have only one button and when user click on button then just server datetime will be shown by
icallback. few days back it was working but now i saw it is stop working. i am running the program from VS2005 IDE. i just can not understand
why it is not working. i am getting two error and

the errors are 1) WebForm_DoCallback is not defined
2) WebForm_InitCallback is not defined

please help me how to fix this error.

here i am giving my code

html
-----
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BasicCallBack.aspx.cs" Inherits="BasicCallBack" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script language=javascript>

function GetOutputFromServer(strOutput)
{
alert(strOutput);
}

</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="btnVal" runat="server" OnClientClick="CallServerMethod('1','2');return false;"
Style="left: 455px; position: relative; top: 204px" Text="Get Server Date" /></div>
</form>
</body>
</html>

codebehind
-------------
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class BasicCallBack : System.Web.UI.Page, ICallbackEventHandler
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsCallback)
{
ClientScriptManager csm = Page.ClientScript;
String callbackRef = csm.GetCallbackEventReference(this, "arg", "GetOutputFromServer", "");
String callbackScript = "function CallServerMethod(arg, context) {" + callbackRef + "; }";
csm.RegisterClientScriptBlock(this.GetType(), "CallServerMethod", callbackScript, true);
}
}

public void RaiseCallbackEvent(String clientArgs)
{

}

public string GetCallbackResult()
{
return DateTime.Now.ToLongDateString();
}
}


please help me to fix this error.
tbhattacharjee

AnswerRe: Error WebForm_InitCallback and WebForm_DoCallback is not defined Pin
daveyerwin13-Apr-10 9:44
daveyerwin13-Apr-10 9:44 
AnswerRe: Error WebForm_InitCallback and WebForm_DoCallback is not defined Pin
T M Gray13-Apr-10 10:21
T M Gray13-Apr-10 10:21 
GeneralRe: Error WebForm_InitCallback and WebForm_DoCallback is not defined Pin
Tridip Bhattacharjee13-Apr-10 19:52
professionalTridip Bhattacharjee13-Apr-10 19:52 
QuestionApplying theme to User Control. Pin
paper6713-Apr-10 3:43
paper6713-Apr-10 3:43 
AnswerRe: Applying theme to User Control. Pin
buaaytt15-Jul-10 23:11
buaaytt15-Jul-10 23:11 
Questionclickable gridview Pin
tek 200913-Apr-10 1:50
tek 200913-Apr-10 1:50 
AnswerRe: clickable gridview Pin
Sneha Bisht13-Apr-10 2:10
Sneha Bisht13-Apr-10 2:10 
GeneralRe: clickable gridview Pin
tek 200913-Apr-10 4:24
tek 200913-Apr-10 4:24 
GeneralRe: clickable gridview Pin
tek 200913-Apr-10 5:04
tek 200913-Apr-10 5:04 
AnswerRe: clickable gridview Pin
Abhijit Jana13-Apr-10 6:18
professionalAbhijit Jana13-Apr-10 6:18 
GeneralRe: clickable gridview Pin
tek 200913-Apr-10 7:45
tek 200913-Apr-10 7:45 
Questioncheck if flash plugin intalled on browser Pin
gottimukkala13-Apr-10 1:12
gottimukkala13-Apr-10 1:12 
AnswerRe: check if flash plugin intalled on browser Pin
Martin Jarvis13-Apr-10 9:14
Martin Jarvis13-Apr-10 9:14 
AnswerRe: check if flash plugin intalled on browser Pin
T M Gray13-Apr-10 10:28
T M Gray13-Apr-10 10:28 
QuestionReg: language Pin
sowjanya313-Apr-10 1:09
sowjanya313-Apr-10 1:09 
AnswerRe: Reg: language Pin
Gaurav Dudeja India13-Apr-10 1:19
Gaurav Dudeja India13-Apr-10 1:19 
AnswerRe: Reg: language Pin
The Man from U.N.C.L.E.13-Apr-10 1:26
The Man from U.N.C.L.E.13-Apr-10 1:26 

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.