473,320 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

ModalPopupExtender and DOCTYPE problem

Hi all,

I have a web form, and I want to use ModalPopupExtender from Ajax Toolkit.

I am using IE 7.0 as browser, VS 2005 and Ajax and Ajax Tool Kit installed.
Windows XP Pro.

Now I have a very strange problem. With 2nd line of code (DOCTYPE), I can
popup modal dialog in middle of screen, BUT all my styles are lost, including
modal popup is ugly. If I remove DOCTYPE I can see all my styles, BUT modal
dialoge box will popup at top-left corner of page and it will be cut to some
extent.

Does it mean ModalPopupExtender relies on DOCTYPE to display. BUT why my
styles are not availabe with DOCTYPE??? Is there a way I can control display
position of ModalPopupExtender?

Thanks for any suggestion.

Following is my source code, no code behind.

test.aspx
----------------------------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test1.aspx.cs"
Inherits="test1" %>

<!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>Untitled Page</title>
<link href="style.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" language="javascript"
src="scripts/client.js"></script>
<script type="text/javascript" language="javascript"
src="scripts/dom-drag.js"></script>
<link title="win2k-cold-1" media="all"
href="DatePicker/skins/aqua/theme.css" type="text/css"
rel="stylesheet"/>
<script src="DatePicker/calendar.js" type="text/javascript"></script>
<script src="DatePicker/calendar-setup.js" type="text/javascript"></script>
<script src="DatePicker/lang/calendar-en.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server">
<table cellspacing="0" cellpadding="0" width="95%" border="0">
<tr>
<td class="MainHeading">Page</td>
</tr>
</table>
<asp:ScriptManager ID="ScriptManagerMain" runat="server">
<Services>
<asp:ServiceReference path="Services/ClientCallBack.asmx" />
</Services>
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanelVehicles" runat="server"><ContentTemplate>
<ajaxToolKit:ModalPopupExtender ID="mpeDeleteEnrollment" runat="server"
TargetControlID="btnDummy"
PopupControlID="pDelete"
CancelControlID="btnCancel"
BackgroundCssClass="modalBackground"
DropShadow="true">
</ajaxToolKit:ModalPopupExtender>

<asp:Button ID="btnDummy" Text="A" runat="server" />
<asp:Panel id="pDelete" runat="server" CssClass="modalBox" Style="display:
none;">
<table border="0" cellpadding="4" cellspacing="0" width="400">
<tr class="DetailApplet">
<td class="MainHeading"><asp:Localize ID="llDeleteHeader"
runat="server">Delete Enrollment</asp:Localize></td>
</tr>
<tr class="DetailApplet">
<td class="SectionTitle"><asp:Localize ID="llStandardCode"
runat="server">Reason</asp:Localize </td>
<td>
<asp:DropDownList ID="drStandardCode" runat="server"></asp:DropDownList>
<asp:RequiredFieldValidator ID="reqStandardCode"
ControlToValidate="drStandardCode"
EnableClientScript="false" CssClass="ErrorMessage" runat="server"
ValidationGroup="DeleteEnrollment"
ErrorMessage="<br>Please select a reason to delete enrollment.">
</asp:RequiredFieldValidator>
</td>
</tr>
<tr class="DetailApplet">
<td colspan="2" align="right">
<asp:Button ID="btnDeleteEnrollment" runat="server" CssClass="ButtonStyle"
ValidationGroup="DeleteEnrollment" Text="Delete" />
<asp:Button ID="btnCancel" Text="Cancel" CssClass="ButtonStyle"
CausesValidation="false" runat="server" />
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate></asp:UpdatePanel>
</form>
</body>
</html>
--------------------------------------------------------

here is my style.css
--------------------------------------------------------
BODY
{
margin-left:9;
}
input.ButtonStyle
{
font-weight: bold;
color: #303030;
font-family: Verdana,Arial,Tahoma;
border-right: #202020 1px solid;
border-top: #202020 1px solid;
border-left: #202020 1px solid;
border-bottom: #202020 1px solid;
font-size:xx-small;
filter: progid:DXImageTransform.Microsoft.Gradient
(GradientType=0,StartColorStr= '#909090',EndColorStr='#C0C0C0' );
cursor: hand;
padding-left: 10;
padding-right: 10;
}
..MainHeading
{
font-size: 18px;
color: #0D3556;
font-family: Verdana,Arial;
background-color: #FFFFFF;
font-weight: bolder;
}
..SectionTitle
{
font-weight: normal;
font-size: 9pt;
color: black;
font-family: Arial, Verdana;
text-align:right;
vertical-align:top
}
..DetailApplet
{
font-family: Arial, Verdana;
background-color: #EEEEEE;
font-size:8pt;
vertical-align:top;
}
..modalBackground {
background-color: Gray;
filter: alpha(opacity=50);
opacity: 0.5;
}
..modalBox
{
background-color: #f5f5f5;
padding: 3px;
border-right: black 2px solid;
border-top: black 2px solid;
border-left: black 2px solid;
border-bottom: black 2px solid;
}
--
Regards
Hardy
Apr 23 '07 #1
0 3181

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: suzi167 | last post by:
Hello Everyone, I am having the following issue. I have an AJAX enabled Web Application in C#. I am using a Master Page and then I have a Default.aspx page which is based on the Master page....
1
by: Victor | last post by:
Hi guys i have a strange problem about my modalpopupextender. In my page, i put a gridview inside a updatepanel with paging enabled. also i put a modalpopupextender in another updatepanel to do...
1
by: =?Utf-8?B?S3lsZSBNLiBCdXJucw==?= | last post by:
I have a set of controls and logic that must be invoked from several pages within a web application as a popup dialog, so I intend to use a userControl contained in a panel extended with the...
0
by: vincent90152900 | last post by:
In a web page,” Default.aspx”, I have two different WebUserControl,” WebUserControl1_1”, and “WebUserControl2_1” and a ModalPopupExtender,” ModalPopupExtender1” and a Button,” Button1” and a Panel,”...
0
by: lax4u | last post by:
I want to use same ModalPopupExtender for two different Link Buttons. The Ajax Control Toolkit team decided to make the TargetControlID of the extender required. That's fine when i have single button...
1
by: mistryman06 | last post by:
Hi, I'm new to the ASP.NET Ajax. Im struck with an issue. Im having a tabcontainer with 3 tabs. Each tab has a user control (all 3 tab has the same user control) & the user control has a Button &...
0
by: Heron | last post by:
Hi, I have a listbox (lstItems) that I want to populate with the items in another listbox (lstSelected) that's in a modalpopupextender. The update is supposed to happen when I close the...
0
by: kendalljones99 | last post by:
I'm running into a strange problem....When I have a container DIV with the height set up to 2014px all the background gets properly "grayed" and is partially opaque. If the container DIV is just 1...
0
by: mohaaron | last post by:
Hello all, I have been using the ModalPopupExtender as a way of catching errors and displaying them to users. This includes business rule violations that I catch. This all works fine as long as...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.