Link to home
Start Free TrialLog in
Avatar of RadhaKrishnaKiJaya
RadhaKrishnaKiJaya

asked on

Pop up modal form

Hi Experts,

In my project I have a button called "Make  Job". When I click that button I need a small window (modal form) to open with a textbox and a button. Also I need to pass the Job number to this window (Modal form). When I click OK I need to update the database. Please help me how to do it. I am using asp.net and VB.Net.

Thanks.
Avatar of Najam Uddin
Najam Uddin
Flag of United States of America image

How are you creating modal pop up? Is it a separate page then pass by query string or read from session value. If is a div shown as popup by jquery, create a hidden field.

Knowing how you are creating modal will let me give better answer.
Avatar of RadhaKrishnaKiJaya
RadhaKrishnaKiJaya

ASKER

Hi,

Thank you for your reply. I need a separate form with a textbox and a button. But I need it as a small window and want to pass parameter form the first form. I have no idea what is the right way to do this. so please suggest.

Thanks.
<script src="Scripts/jquery-1.7.2.js" type="text/javascript"></script>
    <script src="Scripts/jquery-ui-1.8.20.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(function () {
            $("#dialog-page").dialog("destroy");
        });

        function showDialog("GiveSomeNameHere) {
            $("#dialog-page").load('../Page.aspx').dialog({
                autoOpen: false,
                resizable: true,
                height: 400,
                width: 600,
                modal: true
            });

            $('#dialog-page').dialog('open');
            return false;
        }
    </script>

Open in new window


in html
<div id='dialog-page' title="Modal">
// put your controls here        
</div>

<asp:LinkButton ID = "lbtnModal" runat="server" Text="Open" OnClientClick="javascript:return showDialog(this.name);" ></asp:LinkButton>

Open in new window


Other Link
How to pass parameter?
ASKER CERTIFIED SOLUTION
Avatar of Najam Uddin
Najam Uddin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you very much.