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 is razor? : asp.net mvc

553


Which ASP.NET configuration options are supported in the ASP.NET implementation on the shared web hosting platform?

647


What are Master Pages in ASP.NET? or What is a Master Page?

607


What is the differences between a primary key and a unique key in sql server?

530


What is a viewbag?

501






What is the difference between debug and release?

514


If we remove web.config or machine.config from the application then, is this application will works?

590


What are the different types of proxy patterns?

589


Define web services in asp.net.

553


What are the different types of Caching techniques in ASP.NET?

569


How ASP.NET page works?

671


How can i explain my project during interview?many time i expalain my project but they did't accept? please explain me.

5068


What is the state management in asp.net?

542


What are the 3 types of web?

500


How do I open an ashx file in windows 7?

565