Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6136783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:38:42+00:00 2026-05-23T17:38:42+00:00

Hello everyone iam trying to open a aspx page in a dialog box window

  • 0

Hello everyone iam trying to open a aspx page in a dialog box window from asp button click event but even after specifying the dialog height and dialog width i want i could see dialog window opening in a default size.It seems like the height and width parameters i am passing are ignored.

Here is the Server Side Code:

ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(),Guid.NewGuid().ToString(), "try { showMessageRulesDialog('MessageRuleCenterFrame.htm', true); }catch(e){alert(e);}", true); 

JavaScript Code:

function showMessageRulesDialog(dialogName, refresh) 
{
try {

    var WinSettings =       "wcenter:yes;resizable:no;onscroll:off;dialogHeight:700px;dialogWidth:610px;";
    var ret = window.showModalDialog("../Dialogs/" + dialogName,"", WinSettings);
    if (refresh) {
        window.location = window.location;
    }
}
catch (e)
{ alert("ShowDialog Error: " + e); }
}

HtmPage Properties

<iframe src="MessageRulesCenter.aspx"  style="height:700px;width:610px;" frameborder="0"   scrolling="yes"></iframe>

MessageRulesCenter.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MessageRulesCenter.aspx.cs"  Inherits="Dialogs_QuotaCenter" %>
<!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">
<%--<base target="_blank" /> --%>
<title>Quota Message Center</title>
<link rel="Stylesheet" href="../Skins/QuotaCenter.css" />
<script language="javascript" type="text/javascript" src="../Scripts/Common.js"></script>
<style type="text/css">
    #form1
    {
        height: 450px;
        width: 581px;
    }
     .formfield * {
         vertical-align: middle;
         border-width:0px;
    }
</style>
</head>
<body style="text-align: left">
<form id="form1" runat="server">      
    <table style="height: 437px; width: 582px"  >
        <tr>
           <td bgcolor="#91ACFF">

              <div class="Section" id="Sec1">                      
                <div>
                  <br /> &nbsp;
                 <asp:Label ID="Label1" runat="server"  Text="Message Rule Name : " 
                   ForeColor="Black" Font-Bold="False"></asp:Label>                     
                 <asp:TextBox ID="txtRuleName" runat="server"></asp:TextBox>
                   <br /><br />
                </div>

                <div>
                  &nbsp;&nbsp;<asp:Label ID="Label2" runat="server" ForeColor="Black" 
                  Text="Create Message Rule On :" Font-Bold="False"></asp:Label>                      
                    <br />
                    <br />
                </div>                    

              </div>

              <div class="Section" id="Sec2">

                <div>
                  &nbsp;&nbsp;&nbsp;&nbsp;
                  <asp:RadioButton ID="rdoIncoming" GroupName="MessageRules" runat="server" ForeColor="Black" 
                      Text="Incoming Message" AutoPostBack="True" 
                        oncheckedchanged="rdoOutgoing_CheckedChanged" />
                  <asp:RadioButton ID="rdoOutgoing" GroupName="MessageRules"  runat="server" ForeColor="Black" 
                      Text="Outgoing Message" oncheckedchanged="rdoOutgoing_CheckedChanged" 
                        AutoPostBack="True" />
                    <br />
                  <br />
                </div> 
                <div>
                    &nbsp; 
                    <asp:Label ID="Label3" runat="server" ForeColor="Black" Text="Where"></asp:Label>
                    <br />
                </div>

                <div>
                   <p class="formfield">
                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="lblField1" runat="server" ForeColor="Black" Text="From field Contains :"></asp:Label>
                         &nbsp;
                       <asp:TextBox ID="txtField3" runat="server" Width="272px" TextMode="MultiLine"></asp:TextBox>
                         &nbsp;&nbsp;&nbsp;
                       <asp:Button ID="btnAddContact" runat="server" Text="Add Contact" Width="102px" onclick="btnAddContact_Click"/>                   

                       <br />    
                  </p>              
               </div>

               <div>
                 <p class="formfield"> 
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
                 <asp:Label ID="lblFiled2" runat="server" ForeColor="Black" Text="Subject Contains :"></asp:Label>
                   &nbsp;&nbsp;
                 <asp:TextBox ID="txtField4" runat="server" Width="270px"></asp:TextBox>
                 <br /> 
                 </p>
              </div>

             </div>
             <div class="Section" id ="Sec3">  

                <div>
                     &nbsp;&nbsp;                     
                     <asp:Label ID="Label4" runat="server" ForeColor="Black" Text="Then"></asp:Label>
                </div>
                 <div>
                     <p class="formfield">
                  &nbsp;&nbsp;&nbsp;&nbsp;
                         <asp:RadioButton ID="rdoMove" runat="server" GroupName ="ActionType" ForeColor="Black" Text="Move it to the Folder : " />
                  &nbsp;&nbsp; 
                         <asp:DropDownList ID="ddlMove" runat="server" Width="165px" onselectedindexchanged="ddlMove_SelectedIndexChanged" >
                         </asp:DropDownList>
                     </p>
                 </div>
                 <div>
                     <p class="formfield">
                     &nbsp;&nbsp;&nbsp;&nbsp;
                         <asp:RadioButton ID="rdoCopy" runat="server" GroupName ="ActionType" ForeColor="Black" Text="Copy it to the Folder : " />
                      &nbsp;&nbsp;
                         <asp:DropDownList ID="ddlCopy" runat="server" Width="165px" onselectedindexchanged="ddlMove_SelectedIndexChanged" >
                         </asp:DropDownList>
                     </p>
                 </div>
                 <div style="text-align:right">
                    <asp:Label ID="lblError" runat="server"></asp:Label>
                    <p class="formfield">                           
                     <asp:Button ID="btnDone" runat="server" Text="Done" OnClick="btnDone_Click" Width="61px" />
                     <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Cancel" />
                    </p>
                 </div>                    
              </div>               

           </td>
          </tr>

       </table>      
</form>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:38:43+00:00Added an answer on May 23, 2026 at 5:38 pm

    I tried your code and it seems it works fine. My guess for why it is not working as expected could be because of the browser version.

    Check if you get the required behavior if you remove the Doctype declaration (the top most line in the page).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello Everyone Iam trying to bulk insert data from .dat file(unloaded from sybase) in
Hello again ladies and gents! OK, following on from my other question on ASP.NET
Hello everyone I am trying to resize an image of 700kb with imagecreatefromjpeg. This
Hello everyone i want search data from invoices and client by today date I'm
Hello everyone I'm trying to convert a PKCS#8 private key that I generate in
Hello everyone thanks for looking into my problem. What I am trying to do
Possible Duplicate: Count bytes in textarea using javascript Hello everyone. I am trying to
Hello Everyone and Good Morning, I am working with the page: http://702wedding.com/live/ And it
THIS PROBLEM IS NOW SOLVED. THANK YOU TO EVERYONE WHO REPLIED. Hello, I am
Hello everyone I am new to blackberry and I want a textfield that scroll

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.