Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Discussions

PerfectPhase PerfectPhase "This is not war, this is pest control!" - Dalek to Cyberman
  • Problem upgrading ASP.NET web page from v1 to v2

    Thats good news that they are going to fix it for RTM

    scottgu wrote:

    -- Custom Page Base Classes that code-behind classes derive from that declare controls as field declarations.  Because of the changes to the code-behind model, users who have migrated apps to V2 sometimes see null reference exceptions when accessing these fields on the “grandparent” base-class because the .aspx compiler can’t correctly wire-up the control references to the fields.  We’ve now added support for this in V2, and the migration wizard will automatically configure code-behind classes that use custom base classes appropriately for you



    I'm intreasted to know if they have fixed it in the migration wizard, which would suggest I should be possible to get it working in Beta2 or if the have changed the runtime.  It would be nice if the aspx compiler could use reflection to look for matching control definitions in the base class, and if it finds them use them instead of generating it's own instance.

    Stephen.

  • Problem upgrading ASP.NET web page from v1 to v2

    I'm trying to work out how to do something in v2 that I use a lot in v1

    Basically I have a base class that declares several controls such as a label and command button as protected members, then I have an aspx page that that inherits from the base class. now this all worked in v1, the <asp:label> in the aspx page would get wired up to the member in the base class via the code behind file.

    In V2 with partial classes and the changes made in beta 2 to allow deployment of the aspx pages this does not work any more.  If the aspx and the code behind where real partial classes it may have worked, but as we now have:

    Aspx <--Partial--> Glue Code (1)
                           |
                        Inherit
                           |
                       More Glue <--Partial--> Codebehind
                                                    |
                                                 Inherit
                                                    |
                                                Base Class (2)

     In this set up the label is re-declared in (1) and thus hides the one in the base class (2).

    I can't see a way around this as I have no access to the code in (1), generated by the runtime, there is no way I can remove the definition.

    I'm trying to think of a way that avoids me having to rewrite loads of code.

    Thanks for any advice,

    Stephen

  • Disable enhanced security in Outlook 2003

    When Outlook 2003 is running in stand alone mode (i.e. no exchange server) using POP3, how do you disable the security that stops you launching links to external web sites in emails.

    Thanks

    Stephen.

  • London beats Paris to 2012 Games

    Congestion charge

    http://www.cclondon.com/
    http://www.cclondon.com/imagingandcameras.shtml

    Stephen.

  • Software patent bill thrown out

    There's always a next time, but a bit of breathing space for the moment.

    Stephen

  • Software patent bill thrown out

    Finally some sense from the EU!

    The European Parliament voted 648 to 14 to reject the Computer Implemented Inventions Directive.

    http://news.bbc.co.uk/1/hi/technology/4655955.stm


    Stephen

  • London beats Paris to 2012 Games


    http://news.bbc.co.uk/sport1/hi/front_page/4655555.stm

    Stephen

  • ASP.NET v2 Gridview and CSS

    Well thats no good Wink

    Thanks,

    Stephen

  • ASP.NET-2.0 Master-Pages

    spoofnozzle wrote:

    MasterPage1 has 2 placeholders::

    PlaceHolderA <--> ContentPage1
    PlaceHolderB <--> MasterPage2

    Masterpage2 has 5 placeholders::

    PlaceHolderC <--> ContentPage2
    PlaceHolderD <--> ContentPage3
    PlaceHolderE <--> ContentPage4
    PlaceHolderF <--> ContentPage5
    PlaceHolderG <--> ContentPage6


    As rv said, the includes only work up the page, think of it as a branching tree with the root master at the top fanning out through nested masters to content pages.  Your Content place holders must be filled by nodes as you work up the tree, you can call back down a different branch.

    Want you want to do is put the included content (pages 1,2,3,5,6) in UserControls (ascx) and inclde them in the most derived page where the content is common instead of ContentPlaceHolders. Then when you call ContentPage4 it should all work.  So you would end up with something like

    MasterPage1 ::

    UserControl1
    PlaceHolderB <--> MasterPage2

    Masterpage2 ::

    UserControl2
    UserControl3
    PlaceHolderE <--> ContentPage4
    UserControl5
    UserControl6

    Ofcourse you can add more masterpages if you want for example to define the layout first then add controls in the next layer down.

    Stephen.

  • ASP.NET-2.0 Master-Pages

    you have a master page that has named contentent place holders, these pages have the .master extension.  you per page content then goes into normal aspx pages that have Content tags that match all the ContentPlaceHolder tags in the .master via ContentPlaceHolderID atrributes.

    For Nested masters, you just have contentPlaceHolder tags inside content tags in .master pages.

    It works that your base aspx page inclues the masters, so you must fullfill all your content place holders from the aspx page. you can't have the idea where you can implement each of the content place holders in differnt files.

    for example if your root master defines a basic layout with ContentPlaceHolder1, ContentPlaceHolder2, then your nested master might add a banner into ContentPlaceHolder1 and in its implentation of ContentPlaceHolder2 (i.e. a content tag) it would contain another ContentPlaceHolder holder tag, ContentPlaceHolder3.  The final part is to add a content tag into your aspx page that the client calls that implements ContentPlaceHolder3.

    Only the root .master shold have the standard HTML boilerplate and form tag, the remaining .masters and .aspx should only containg content in content tags.

    Sorry if thats a bit of a mess, it's late and I need to sleep!

    Stephen