|
Hi All, few Days ago i posted a Problem and i did not get any
Help or Tip. So I try to make the “Call” again and hope, that someone
will be so kind and help me. Here is the Problem: To realize a Message-Boxes, I made a Class
“Messages” like this: // =====bof using System; using System.Web.UI; using System.Web.UI.WebControls; namespace DevProjects_IComVBX.VBXClasses {
/// <summary>
/// Zusammenfassung für VBXMessages.
/// </summary>
public class VBXMessages
{
public VBXMessages()
{
}
public void CreateConfirmBox( Button oButton, string cMessage )
{
oButton.Attributes.Add( "onclick", "return
confirm('" + cMessage + "');" );
}
public void CreateAlertBox( Page oPage, string cMessage, string cMsgKey )
{
string cScript = "<script language=_javascript_>" +
"alert('" + cMessage + "')" +
"</script>"; if (
!oPage.IsStartupScriptRegistered(cMsgKey) ) {
oPage.RegisterStartupScript( cMsgKey, cScript ); }
}
} } // =====eof From Code I use it for an Alertbox like this: Private void doSomething { If ( !true ) { … VBXMessages oMsg = new
VBXMessages(); oMsg.CreateAlertBox( this,
"Something Failed!", “marker1” ); … } } THIS will work fine from Dev-Environment
(Windows/VS2003) AND (!) when running from Mono. Now an Example, how implement a Confirmbox: private void Page_Load(object sender,
System.EventArgs e) { … if( !IsPostBack ) {
VBXMessages oMsg = new VBXMessages();
oMsg.CreateConfirmBox( btnDele, "Delete that Record?" ); } } That’s working fine also when running from my
Dev-Environment (as described above) – but when running from Mono: NOTHING HAPPENS ! J The generated HTML looks like this: <td valign="bottom"
align="right" width="100"> <input type="submit"
name="btnDele" value="Lschen" (typeof(Page_ClientValidate)
== 'function') Page_ClientValidate();" language="_javascript_"
id="btnDele" confirm('Delete that
Record?');"
style="border-width:1px;border-style:Solid;height:20px;width:100px;"
/> </td> WHATS WRONG ? Or: Does anyone knows what I can do to implement this
2 Features: an Alertbox and a Confirmbox that will work with Mono and IIS ? Regards Jan Waiz |
_______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
