javascript代码
function logoutPop() {
var a = confirm("are you sure !");
if (a = true)
return true;
else return false;
}
.aspx 文件
protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
{
string selectedItem = e.Item.Value;
if (selectedItem == "logout")
{
// here i want to call javascript function logoutPop() and check return value. if true want to redirect login page else nothing.
有没有办法做到这一点。我试过 scriptmanager 但没有成功。请帮忙 。谢谢你。