what is client back feauture ?

Answer Posted / chandrasekar_namakkal

ClientSideCallback used to avoid form Postback for each
and every time .I have posted some sample code also try
which is use for Dropdown


aspx.cs
private string _pricecallbackResult,
_pricecallbackResultCAT, _pricecallbackResultClass;


public string GetCallbackResult()
{
return _pricecallbackResult;
}

public void RaiseCallbackEvent(string eventArgument)
{



string[] val = eventArgument.Split(',');
string id = val[0].ToString();
string k = val[1].ToString();
if (val[1] == "1")
{
// _pricecallbackResult =
objCommonBL.GetProgramNameForRebate();

}
else if (val[1] == "2")
{


_pricecallbackResult =
objCommonBL.GetCategoryNameForRebate(Convert.ToInt32(id));


}
else if (val[1] == "3")

{
_pricecallbackResult =
objCommonBL.GetClassNameForRebate(Convert.ToInt32(id));

}


}


in Aspx Java Script
*********************


function PriceClientCallbackError(result, context)
{
alert(result);
}

function PriceClientCallback(result, context)
{
ClassClear();
if (!result)
{
return;
}

var resultValue = result.split(',');
for (var i = 0; i < resultValue.length; ++i)
{
var val = resultValue[i].split('~~');
for(var j=0;j<val.length; ++j)
{
var values = val[j].split('~');
var option = document.createElement
("OPTION");
option.value = values[0];
option.innerHTML = values[1];
document.forms[0].ctl00$ContentPlaceHolder1
$frmRebate$ddlCategory.appendChild(option);
}
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are sessions in asp net?

526


Explain the difference between value type and reference type?

263


Why do we need Sessions?

578


What is the parent class of all the web server control?

487


Are there any resources for drop-in replacements for the default css that comes with the ASP.NET Website template?

564






What language is asp.net written in?

528


What are the different types of validation controls provided in ASP.NET?

669


What is a multilingual website?

565


Who is using asp.net?

506


How to count the number of objects present in a web page? How to count the number of radio buttons in a web page?

636


What are the various session state management options provided by asp.net?

543


What are validator? Name the validation controls in asp.net? How do you disable them? Will the asp.net validators run in server side or client side? How do you do client-side validation in .net? How to disable validator control by client side javascript?

551


What is the default timeout for a cookie?

560


What does ascx stand for?

511


code for "For every 5days system has to create 1text file with the corresponding date and it has to store in c-drive" by using web applications

1413