1.> Create Jquery Function.
function SetMachineValue(txt) {
$("#" + txt).trigger("change");
}
2.> Call Jquery Function From Code behind using ScriptManager
protected void grdConfiguration_RowCommand(object sender, GridViewCommandEventArgs e)
{
try
{
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "myJsFn", "SetMachineValue('" + txtRatio1.ClientID + "');", true);
}
catch ()
{
}
}
function SetMachineValue(txt) {
$("#" + txt).trigger("change");
}
2.> Call Jquery Function From Code behind using ScriptManager
protected void grdConfiguration_RowCommand(object sender, GridViewCommandEventArgs e)
{
try
{
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "myJsFn", "SetMachineValue('" + txtRatio1.ClientID + "');", true);
}
catch ()
{
}
}
No comments:
Post a Comment