Dec 09, 2011, 3:45 AM
Need Help : MessageBox setIcon() not working on Alert()
Hi,
I have implemented ext.net MessageBox in my codes.
Im wondering that SetIcon(MessageBox.Icon.Question) or SetIcon("Question") is not at all working for Alert() method. but working fine for Confirm() and Prompt() methods. (not only this, other icons also not working with Alert()).
Below is my code.
Plz help me on this asap.
Previously i was using the below normal javascript code (from codebehind) to display alerts in my project when insert/update button clicks.
Thanks in advance.
Regards,
Santhosh
I have implemented ext.net MessageBox in my codes.
Im wondering that SetIcon(MessageBox.Icon.Question) or SetIcon("Question") is not at all working for Alert() method. but working fine for Confirm() and Prompt() methods. (not only this, other icons also not working with Alert()).
Below is my code.
In aspx page:
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<asp:Button runat="server" ID="btnShowMsg" Text="Show Me Alert" OnClick="btnShowMsg_Click" />
In Code behind:
protected void btnShowMsg_Click(object sender, EventArgs e)
{
Ext.Net.MessageBox msg = new MessageBox();
msg.Alert("Message", "success");
msg.SetIcon("WARNING");
//msg.SetIcon(MessageBox.Icon.WARNING);
msg.Show();
}
(OR)
protected void btnShowMsg_Click(object sender, EventArgs e)
{
Ext.Net.X.Msg.Alert("hello", "Success");
Ext.Net.X.Msg.SetIcon(MessageBox.Icon.WARNING);
Ext.Net.X.Msg.Show();
}
Even i added EnableViewState= true to the button also, no luck. Am i missing anything here? Or is it a bug ?Plz help me on this asap.
Previously i was using the below normal javascript code (from codebehind) to display alerts in my project when insert/update button clicks.
ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", string.Format("alert('Successfully created.');"), true);
Now i wanted to replace this with ext MessageBoxes with several default Icons. As shown in the above codes, am i doing in a right way or is there any other way to implement this ?Thanks in advance.
Regards,
Santhosh
Last edited by santhu12smart; Dec 09, 2011 at 4:20 AM.