Results 1 to 7 of 7

Thread: confirm message box problem

  1. #1
    Member
    Join Date
    Feb 2012
    Posts
    12

    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
    Ext.NET - Support Team Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    25,482
    Hi,

    Here you are.

    Example
    Code:
    <%@ 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.
    Daniil
    Ext.NET, Inc.
    Support Team

    Ext.NET Examples | Ext.NET API Docs | ExtJS API Docs | Twitter | Jobs

  3. #3
    Member
    Join Date
    Feb 2012
    Posts
    12

    For daniel

    Dear Daniel,

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

    Regards
    Mahmood

  4. #4
    Ext.NET - Support Team Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    25,482
    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.
    Daniil
    Ext.NET, Inc.
    Support Team

    Ext.NET Examples | Ext.NET API Docs | ExtJS API Docs | Twitter | Jobs

  5. #5
    Member
    Join Date
    Feb 2012
    Posts
    12

    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
    Ext.NET - Support Team Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    25,482
    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.
    Daniil
    Ext.NET, Inc.
    Support Team

    Ext.NET Examples | Ext.NET API Docs | ExtJS API Docs | Twitter | Jobs

  7. #7
    Member
    Join Date
    Jun 2012
    Posts
    8
    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)...

    Code:
    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 Premium Help
    Replies: 7
    Last Post: Aug 07, 2009, 1:37 AM
  4. [CLOSED] confirm message problem
    By speedstepmem3 in forum 1.x Premium Help
    Replies: 1
    Last Post: Feb 12, 2009, 5:43 AM
  5. Ext confirm message
    By methode in forum Feature Requests
    Replies: 4
    Last Post: Nov 20, 2008, 1:02 PM

Tags for this Thread

Posting Permissions