what is client back feauture ?



what is client back feauture ?..

Answer / 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

More ASP.NET Interview Questions

What are the different types of sessions in asp.net?

1 Answers  


how can you bind data from dataset to XML file

2 Answers   LG Soft,


How will you do Redo and Undo in a TextControl?

1 Answers  


What is difference between ASP and ASP.NET ?

3 Answers   TCS,


What is WebService ?

8 Answers   Tanla Solutions, Yahoo,


What is machine.config and web.config ?

5 Answers   Digital GlobalSoft,


What is HTTPModule and HTTPcontext? What is the use of each?

1 Answers   Accenture,


What are server objects?

1 Answers  


how to elimainte the similar data from the different tables

1 Answers  


How can we use Web API with ASP.NET Web Form?

1 Answers  


What is the difference between Classic ASP and ASP.Net?

1 Answers  


Security types in ASP/ASP.NET? Different Authentication modes?

4 Answers   QuadLabs Technologies,


Categories