在ContinueClick代码中,它给出一个错误“控件必须在控件树中 一页参数名称:control“
$('#' + btnContinueClientID).click(function ()
{
ToShowAlertMessage()
}
function ToShowAlertMessage(controlName, segmentID, passengerID) {
$.post("/JQuerySeatMap.aspx",
{ ClickedControl: controlName,
str1: str1,
str2: str2,
str3: str3
},
public string ContinueClick(string str1, string str2, string str3)
{
ScriptManager.RegisterStartupScript(this, GetType(), "ClientScript", "alert('Alert
Message.');, true);
}
But in the ContinueClick code it gives an error "The control must be in the control tree
of a page. Parameter name: control"
答案 0 :(得分:0)
更好的方法是将alert
置于JS回调中,而不是注册ScriptManager
来调用某些客户端代码。
$.post("/JQuerySeatMap.aspx",
{ ClickedControl: controlName,
str1: str1,
str2: str2,
str3: str3
}, function(data) {
alert('Alert Message.');
});