CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 3/7/2007 3:20:17 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 0 Views: 23 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
1 Items, 1 Pages 1 |< << Go >> >|
cdutoit
Asp.Net User
Detailsview not working with masterpages3/7/2007 3:20:17 PM

0/0

I have implemeted master pages for a site that I'm busy with. I however have trouble getting a detailsview to work.

If the page content is run without a masterpage spesification, it works fine, but as soon as I implement a masterpage for the given page content I can't insert or update the detailsview.

On debug I can see that old values are posted to the object datasource if a masterpage is used. Without a masterpage, the updated values are passed.

Any ideas why this occur???       (There is no compiler error or any code behind data.  The master page also haven't given me any problems on other pages with datagrids etc.)

 Not working with Masterpage.

Code:
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage-2Column.master"
    CodeFile="SectionsEdit.aspx.cs" Inherits="Admin_SectionsEdit" Title="" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolderLeftColumn">
    &nbsp;
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ContentPlaceHolderCenterColumn">
    <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" AutoGenerateDeleteButton="True"
        AutoGenerateEditButton="True" AutoGenerateInsertButton="True" DataSourceID="ObjectDataSource1"
        Height="50px" Width="125px">
    </asp:DetailsView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DeleteSection"
        InsertMethod="InsertSection" SelectMethod="GetSection" TypeName="Sections" UpdateMethod="UpdateSection"
        OldValuesParameterFormatString="{0}">
        <DeleteParameters>
            <asp:Parameter Name="original_sectionId" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="title" Type="String" />
            <asp:Parameter Name="description" Type="String" />
            <asp:Parameter Name="pageUrl" Type="String" />
            <asp:Parameter Name="imageUrl" Type="String" />
            <asp:Parameter Name="imageAltText" Type="String" />
            <asp:Parameter Name="sortOrder" Type="Int32" />
            <asp:Parameter Name="active" Type="Boolean" />
        </UpdateParameters>
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="2" Name="sectionId" QueryStringField="sectionId"
                Type="Int32" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="title" Type="String" />
            <asp:Parameter Name="description" Type="String" />
            <asp:Parameter Name="pageUrl" Type="String" />
            <asp:Parameter Name="imageUrl" Type="String" />
            <asp:Parameter Name="imageAltText" Type="String" />
            <asp:Parameter Name="sortOrder" Type="Int32" />
            <asp:Parameter Name="active" Type="Boolean" />
        </InsertParameters>
    </asp:ObjectDataSource>
</asp:Content>


Working without masterpage:

Code:
<%@ Page Language="C#" AutoEventWireup="true" 
    CodeFile="SectionsEdit.aspx.cs" Inherits="Admin_SectionsEdit" Title="" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolderLeftColumn">
    &nbsp;
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ContentPlaceHolderCenterColumn">
    <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" AutoGenerateDeleteButton="True"
        AutoGenerateEditButton="True" AutoGenerateInsertButton="True" DataSourceID="ObjectDataSource1"
        Height="50px" Width="125px">
    </asp:DetailsView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DeleteSection"
        InsertMethod="InsertSection" SelectMethod="GetSection" TypeName="Sections" UpdateMethod="UpdateSection"
        OldValuesParameterFormatString="{0}">
        <DeleteParameters>
            <asp:Parameter Name="original_sectionId" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="title" Type="String" />
            <asp:Parameter Name="description" Type="String" />
            <asp:Parameter Name="pageUrl" Type="String" />
            <asp:Parameter Name="imageUrl" Type="String" />
            <asp:Parameter Name="imageAltText" Type="String" />
            <asp:Parameter Name="sortOrder" Type="Int32" />
            <asp:Parameter Name="active" Type="Boolean" />
        </UpdateParameters>
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="2" Name="sectionId" QueryStringField="sectionId"
                Type="Int32" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="title" Type="String" />
            <asp:Parameter Name="description" Type="String" />
            <asp:Parameter Name="pageUrl" Type="String" />
            <asp:Parameter Name="imageUrl" Type="String" />
            <asp:Parameter Name="imageAltText" Type="String" />
            <asp:Parameter Name="sortOrder" Type="Int32" />
            <asp:Parameter Name="active" Type="Boolean" />
        </InsertParameters>
    </asp:ObjectDataSource>
</asp:Content>
1 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007
ASP.NET 2.0 Everyday Apps For Dummies Authors: Doug Lowe, Pages: 504, Published: 2006
Beginning ASP.NET 2.0 with C# Authors: Chris Hart, John Kauffman, David Sussman, Chris Ullman, Pages: 735, Published: 2006
ASP.NET 2.0 Black Book: black book Authors: Dreamtech Software, Dreamtech Software, Charul Shukla, Anil Kumar Barnwal, Dreamtech Software India, Pages: 1167, Published: 2006
Professional ASP.NET 3.5: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1673, Published: 2008
Core Internet Application Development with ASP.NET 2.0 Authors: Randy Connolly, Pages: 1049, Published: 2007
Beginning ASP.NET 2.0 Authors: Chris Hart, John Kauffman, Chris Ullman, David Sussman, Pages: 759, Published: 2005
Programming Microsoft Web Forms Authors: Douglas J. Reilly, Pages: 303, Published: 2005
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
Mastering Web Development with Microsoft Visual Studio 2005 Authors: John Paul Mueller, Pages: 822, Published: 2005

Web:
datagrid vs detailsView/GridView for handling a popup calendar ... because I am using a masterpage. In all of the solutions .... (based on my form name and my DetailsView name, but why is this not working? ...
CodeProject: FileUpload with Master Page, Ajax Update Panel ... May 23, 2008 ... Ajax not support File upload control (because file upload control need complete post back event), and ajax code is in Master page, ...
Javascript Object Expected Error, Master Pages & DetailsView Confl If (Not cs.IsClientScriptIncludeRegistered(cstype, csname)) Then .... all three methods working when it wasn't in the MasterPage/DetailsView ...
p2p.wrox.com Forums - masterpages, contentplaceholder, formview ... Nov 30, 2007 ... NET 2.0 Beginner > masterpages, contentplaceholder, formview, button ... TATextbox.text is not null. So, when the formview loads, ...
Master Pages :: Programmatic Interaction Between a Content Page ... Note: This tutorial does not delve into the specifics of working with data in ASP. .... from the DetailsView the GridView in the master page still shows the ...
Set value of DropDownList in DetailsView. All are in Master Page ... I can not get the syntax right. The ContentPlaceHolderID= MainConte… ... Set value of DropDownList in DetailsView. All are in Master Page ...
strange inconsistency referencing controls in Formview itemtemplate 2) No, I am not currently using master pages. -- Ned William Sullivan wrote: .... ASP.NET 2.0 stopped working - please help! ...
ASP.NET 2.0 : Working With Master Pages ASP NET 2 0 Training Working With Master Pages In this Tutorial you will learn how to ... Here we are creating a File system folder so we do not change the ...
Master Pages and FormView / DetailsView - ASP.NET Forums I know with images, they need to be in a directory where the MasterPage has access - I moved my JPGs to /images/ from /App_Data/ and got that working - but ...
ASP.NET 2.0 Working With Master Pages Jun 1, 2006 ... ASP.NET 2.0 Working With Master Pages, Hits: 712 ... Average Member Rating: Not yet reviewed by any member. ...




Search This Site:










isinrole not working

security with windows authentication

visibility=hidden server controls

unhandled exception - value cannot be null - basepath

search results item detail on different control

how to fix the random photo performance problem ?

rss feed manager

login

formatting description field

password comparison - urgent

capture prerender for the content page

theme and masterpage

how could i change expiration time of forms authentication cookie?

duplicate controls

help desk module

dnn rental / reservation module

how to sign out on windows based authentication

treeview selectedindexchanged not firing for the selected node if you collapse nodes recursively ?

has anyone encountered this error in dnn 1.0.10?

portalcfg.xml

system.nullreferenceexception error

sql query using powerreports is wrong -- help please

passwordrecovery control

i have a problem in design mode

password length and min criteria

static html pages in master page

3.2.0 treeview control not working in file manager

write extra profile information to profilebase during registration failed

dropdownlist composite control viewstate problem

moving webparts from one zone to another

 
All Times Are GMT