IMPORTANT - Using dOOdads in an ASP.NET Application

All your dOOdad needs ...

Postby swonderme on Fri Feb 03, 2006 1:55 am

With .net 2.0 having master pages that each page in an app can use, would it work to insert this code in there (in the master page)?

I'm not real sure how the individual pages in the app inherit from the master. Actually I can't find if they do actually \"inherit\" from it, they reference it by using MasterPageFile=\"MyMasterPage.master\" in the page directive. I'm not exactly sure what's going on behind the scenes.

The master page is a partial class as shown below.

Partial Class MasterPage
Inherits System.Web.UI.MasterPage
End Class

I'd test it myself, but I'm not sure how to produce the error.

Anyone know if this will work, it'd be mighty convenient if so!
swonderme
Corporal
 
Posts: 22
Joined: Sun Oct 09, 2005 11:47 pm

Postby mike.griffin on Fri Feb 03, 2006 5:33 am

I'm generating ASP.NET 2.0 pages that go on master pages, I'm burned out right now, will post my thoughts on this later in the morning
User avatar
mike.griffin
Site Admin
 
Posts: 3290
Joined: Sat Apr 03, 2004 6:10 am
Location: Indianapolis, IN

Re:

Postby swonderme on Fri Feb 03, 2006 4:42 pm

mike.griffin wrote:I'm generating ASP.NET 2.0 pages that go on master pages, I'm burned out right now, will post my thoughts on this later in the morning


No problem Mike, I saw all the activity going on with Entity Spaces so I'm understand you're slammed. No rush at all. :-)

Can't wait to check out the new stuff!
swonderme
Corporal
 
Posts: 22
Joined: Sun Oct 09, 2005 11:47 pm

Postby swonderme on Fri Feb 10, 2006 10:09 pm

Just wanted to bump this question because I think it got overlooked. Does anyone know if this code can be added into a master page under 2.0?

Thanks.
swonderme
Corporal
 
Posts: 22
Joined: Sun Oct 09, 2005 11:47 pm

Postby mike.griffin on Sat Feb 11, 2006 1:19 am

Do you have VS2005, all you do is create master page and then when you create web pages (during the creation process) you tell VS2005 what master page to use?

A Page that goes on the master page
Code: Select all
<%@ Page Language=\"C#\" MasterPageFile=\"~/AdminMasterPage.master\" AutoEventWireup=\"true\" CodeFile=\"UsesMaster.aspx.cs\" Inherits=\"UsesMaster\" Title=\"Untitled Page\" %>
<asp:Content ID=\"Content1\" ContentPlaceHolderID=\"ContentPlaceHolder1\" Runat=\"Server\">

    <!-- YOUR CONTENT GOES HERE -->
   
</asp:Content>



A master page:

Code: Select all
<%@ Master Language=\"C#\" AutoEventWireup=\"true\" CodeFile=\"AdminMasterPage.master.cs\" Inherits=\"AdminMasterPage\" %>

<!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=\"admin_stylesheet.css\" rel=\"stylesheet\" type=\"text/css\" />   
</head>
<body>
    <form id=\"form1\" runat=\"server\">
    <div>
        <!-- MY HEADER -->
        <asp:contentplaceholder id=\"ContentPlaceHolder1\" runat=\"server\">
        </asp:contentplaceholder>
       <!-- MY FOOTER -->
    </div>
    </form>
</body>
</html>


Your ASPX page that uses a master page can still have a Page_Load, all programming is as normal. Does that help?
User avatar
mike.griffin
Site Admin
 
Posts: 3290
Joined: Sat Apr 03, 2004 6:10 am
Location: Indianapolis, IN

Postby swonderme on Mon Feb 13, 2006 3:39 pm

Oh yeah, I'm using master pages just fine, my question was whether we could put the transaction manager reset code for d00dads in the master page.

In other words, if I put the below code in my master page, as opposed to a base page, will that take care of this d00dads issue.

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
TransactionMgr.ThreadTransactionMgrReset()
End Sub
swonderme
Corporal
 
Posts: 22
Joined: Sun Oct 09, 2005 11:47 pm

Postby mike.griffin on Mon Feb 13, 2006 11:25 pm

I would, however, I'm using EntitySpaces on this project and reset isn't needed anymore. However, I would put the reset in the Page_Init method of both the master and one of the pages on the master and see what get's executed first, I'm sure it must be the master, if so then definitely I'd put it there.
User avatar
mike.griffin
Site Admin
 
Posts: 3290
Joined: Sat Apr 03, 2004 6:10 am
Location: Indianapolis, IN

Postby swonderme on Tue Feb 14, 2006 2:15 pm

Thanks......I'll be using Entity Spaces on my projects too, come on March! I'm building a new system and of course my timing is just a bit off on ES, I'm trying to leave some hooks in there though so when Entity Spaces is released I'm ready to go though.

I actually have my DAL in both d00dads and the ES beta running side by side so I can have my code ready for the ES release.
swonderme
Corporal
 
Posts: 22
Joined: Sun Oct 09, 2005 11:47 pm

Timeout Problems

Postby mbonafe on Fri May 12, 2006 7:49 pm

I am using dooDads for an ASP.NET 1.1 application. I have add the code to reset the the transaction manager as suggested on this thread. I am having a problem with timeouts. I cannot save the second entity in a transaction because of this. I am not performing any calls to retrieve data from the DB (SQL Server 2005) once I open the transaction; all the calls are to .Save().

Any suggestions?

Thanks
Mark
mbonafe
Lurker
 
Posts: 6
Joined: Fri May 12, 2006 7:44 pm

Previous

Return to dOOdads - MyGeneration's .NET Architecture

Who is online

Users browsing this forum: No registered users and 1 guest

cron