Problems using masterpages in ASP.NET AJAX 1.0 Beta

R

RBM007

Hello,

I have created some pages in the (old) Atlas pages and migrated to AJAX
version. After the update I noticed that any page containing ASP.NET
AJAX won't compile anymore. Even if the same tags and properties are
used in a page without a masterpage.
Does anyone shares this exprerience with me or does anyone knows an
answer?
For the time being, I copy-pased the headings in my masterpage to the
clield pages.

Thanks in advantage.

Greetings,

René Beltman
 
G

Guest

Did you install Atlas software which will gives you dll
Microsoft.Web.Atlas.dll, and you have to refer the same in your solution.
 
R

RBM007

I have uninstalled Atlas on my system, deleted the atlas dll and
installed AJAX. The AJAX dll is referenced with the add reference
button.

I have tried to translate the page to the AJAX standard.

The problem also occures if I try to create a new project / solution
with masterpages.

Greetings,

René
 
G

Guest

Hi ,
You have to add a Content place holder in your Master page. In the page you
are calling to master page you have to remove html tags and add the below code

<%@ Page Language="C#" AutoEventWireup="true"
MasterPageFile="~/MasterPage.master" CodeFile="X.aspx.cs"
Inherits="CreatePallet" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">

Her you can add table etc
but remove html , head, body tags it wil work

</asp:Content>
 
R

RBM007

Thanks, but I already knows that. My problem is that the following code
will not compile.

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2"
Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<asp:ScriptManager ID="ScriptManager" runat="server">
</asp:ScriptManager>
</asp:Content>

The master page contains the next code:

<%@ Master Language="C#" AutoEventWireup="true"
CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!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>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:contentplaceholder id="ContentPlaceHolder1"
runat="server">
</asp:contentplaceholder>
</div>
</form>
</body>
</html>

And now the suprise, the next code compiles succesfully.

<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</form>
</body>
</html>

Can someone explain me why the above code is not working?
Thanks in advantage.

Greetings,

René
 
G

Guest

Yes, it will not work as asp doesn't have a tag ScriptManager. This tag
belongs to Atlas. You will have to change your code like below.

<atlas:ScriptManager ID="ScriptManager" runat="server" />
 
R

RBM007

The tag changed since Microsoft released ASP.NET AJAX 1.0 Beta. If I am
wrong, please explain me why the third codeblock (without a masterpage)
will compile using the same tags.

Greetings,

René
 
S

sirdaveo

I'm having the same problem. I've been following an old video, and its
taken me hours to find this, but with this version it looks like the
<asp:scriptmanager> tag is only available at the top level page.

In other words:

If your page is not using a mater page, then it can have the
<asp:scriptmanager> tag in it. But once you decide to use a Master
Page, that master page is the ONLY place that the <asp:scriptmanager>
tag can go.

Unless I'm wrong, but I don't think I am. Now We've got to test it to
see if it works.

Please let me know what happens.

Good Luck,
David
 
R

RBM007

I have found the answer! The problem is that Visual Studio can not
compile pages which are closed. So if you open the master page and the
"client" page at the same time, the page is compiling agian. Attention
that I don't know what the build output is if you try to compile
commandline based.

To compile the pages, open in Visual Studio 2005 also the serverpage.

Greetings,

René
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top