我正在从 Javascript 调用代码隐藏方法并将该值传递到隐藏字段中,从该方法我需要调用另一个具有参数 IdataReader 的方法怎么办?
page1.aspx
function changeCurrencyinternaluser()
{
curhf=document.getElementById('TableBuilder1_hf_currency');
currencylit=document.getElementById('lit_currency');
if (currencylit && curhf)
currencylit.innerHTML=curhf.value;
curhfid=document.getElementById('TableBuilder1_hf_currencyid');
currencyid=curhfid.value;
document.getElementById('<%= h3plcurrid.ClientID %>').value = currencyid; //deep
document.getElementById('<%= LinkButton2.ClientID %>').click();
}
page1.aspx.cs
protected void LinkButton2_Click(object sender, EventArgs e)
{
usercurrid = h3plcurrid.Value; // hidden field
//I need to call below method getsupplierNumber
}
private Control getSupplierNumber(IDataReader dr)
{
//some code
}