0

我想知道是否可以alert使用javascript或者ajaxcontroltoolkit我只需要知道是否可以定制,如果可以,我也想知道如何?
到目前为止我学到的唯一方法是这样的:

ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('MessageHere');", true);  

但这有点丑。而且我看到了ofpopUp并且很好(但仅在要求确认时才有用。我不知道如何只发送您知道的消息? 例如:您单击按钮然后收到消息。ConfirmButtonExtenderajaxcontrolToolkitbuttonsCONFIRMATIONconfirmingregister!You registered the new user Sucessfuly

4

2 回答 2

1

There are quite a few plugins for this; if you are already using JQuery, you can use the JQuery UI Dialog. If you are using AJAX control toolkit, there is an extender to show/hide a DIV, called the ModelPopupExtender. There are plenty of other components to find if you google "modal popup". This article has a bunch of other alternatives too.

于 2013-03-22T19:38:43.403 回答
0

Here's something you can try:

In your asp.net code-behind...

In your page load event...

IF some condition is met THEN
   me.pnl_success.visible = true
   ELSE me.pnl_success.visible = false
END IF

And then in your .aspx page, put an <asp:panel> in there with your success message in it.

于 2013-03-22T19:39:35.670 回答