confirm message box problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    confirm message box problem

    Dear All,

    Please tell me how to use the confirm message box using server side code in vb.net. Also please do not refer to the client side code of examples explorer.

    Regards
    MAhmood
  2. #2
    Hi,

    Here you are.

    Example
    <%@ Page Language="VB" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        Protected Sub Confirm(sender As Object , e As DirectEventArgs)
            ExtNet.Msg.Confirm("Confirm?", "Are you sure?", "confirmHandler(buttonId);").Show()
        End Sub
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET Example</title>
    
        <script type="text/javascript">
            var confirmHandler = function (buttonId) {
                alert("The '" + buttonId + "' button is clicked.");
            };
        </script>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:Button runat="server" Text="Confirm" OnDirectClick="Confirm" />
    </body>
    </html>
    Last edited by Daniil; Mar 19, 2012 at 9:02 AM.
  3. #3

    For daniel

    Dear Daniel,

    How can i use that from code behind. i do not want to use script.

    Regards
    Mahmood
  4. #4
    Please provide more details about the requirement.

    I'm afraid I don't understand well what you mean here:
    How can i use that from code behind.
  5. #5

    Confirm Message box problem

    Quote Originally Posted by Daniil View Post
    Please provide more details about the requirement.

    I'm afraid I don't understand well what you mean here:
    Dear Daniil,

    I want to use confirm message box using vb.net but i do not want to use anything like javascript. Please tell me how to use confirm message box using code behind. Please do not use script.


    Regards
    Mahmood
  6. #6
    Well, there is no such thing in Ext.NET to get a Confirmation dialog box without JavaScript at all.

    Generally, all Ext.NET controls use JavaScript in a varying degree.

    To avoid JavaScript at all you could implement your own confirmation dialog using common ASP.NET controls with common PostBack events.

    Returning back to my example. If you just need to call server-side code on clicking "Yes" or "No", you could call a respective DirectMethod from JavaScript.
  7. #7
    Quote Originally Posted by mehmood View Post
    Dear All,

    Please tell me how to use the confirm message box using server side code in vb.net. Also please do not refer to the client side code of examples explorer.

    Regards
    MAhmood
    it will show info alert message (can be used error, warning, etc)...

    ExtNet.Msg.Show(New MessageBoxConfig() With { _
                .Buttons = MessageBox.Button.OK, _
                .Icon = MessageBox.Icon.INFO, _
                .Title = title, _
                .Message = tpl _
               })
    Last edited by Daniil; Jun 21, 2012 at 1:51 PM. Reason: Please use [CODE] tags

Similar Threads

  1. Confirm message with wait not working
    By Mr.Techno in forum 1.x Help
    Replies: 1
    Last Post: Aug 08, 2011, 6:13 PM
  2. Confirm message handler
    By norphos in forum 1.x Help
    Replies: 1
    Last Post: May 18, 2011, 6:51 AM
  3. [CLOSED] Message box confirm dialogue handling
    By Etisbew in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 07, 2009, 1:37 AM
  4. [CLOSED] confirm message problem
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 12, 2009, 5:43 AM

Tags for this Thread

Posting Permissions