Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 5th, 2006, 03:35 PM
Registered User
 
Join Date: Apr 2006
Location: St. Paul, Mn, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Master/Detail page



I have created two pages one master and one detail page.I did pass a value using a query string to detail page. However, when I click the link field from the master page, the detail page comes up blank and it does not show me any error messge either.can some one look at the code below and let me know what is wrong with the code. I am using visual studio 2005 and oracle 9i db. thanks


Master page
***********************
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="master.aspx.vb" Inherits="_Default" %>

<!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>
        <span style="font-weight: bold; color: #333366; font-style: italic; font-variant: normal">
        Master-Detail Page 1:</span><br />
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White"
            BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" DataKeyNames="LCONTID"
            DataSourceID="SqlDataSource1" Width="100%">
            <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
            <Columns>
                <asp:BoundField DataField="MIN(J.ROUTE)" HeaderText="T.H. Number" SortExpression="MIN(J.ROUTE)">
                    <ItemStyle Font-Size="Small" HorizontalAlign="Left" />
                    <HeaderStyle Font-Size="Small" HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="LETTING" HeaderText="Letting Date" ReadOnly="True" SortExpression="LETTING">
                    <ItemStyle Font-Size="Small" HorizontalAlign="Left" />
                    <HeaderStyle Font-Size="Small" HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="CALL" HeaderText="Call Number" ReadOnly="True" SortExpression="CALL">
                    <ItemStyle Font-Size="Small" HorizontalAlign="Left" />
                    <HeaderStyle Font-Size="Small" HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="LCONTID" HeaderText="Contract Id" SortExpression="LCONTID">
                    <ItemStyle Font-Size="Small" HorizontalAlign="Left" />
                    <HeaderStyle Font-Size="Small" HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="CPROJNUM" HeaderText="S.P. Number" SortExpression="CPROJNUM">
                    <ItemStyle Font-Size="Small" HorizontalAlign="Left" />
                    <HeaderStyle Font-Size="Small" HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="CCNTY1" HeaderText="County Number" SortExpression="CCNTY1">
                    <ItemStyle Font-Size="Small" HorizontalAlign="Left" />
                    <HeaderStyle Font-Size="Small" HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="CFACSSUP" HeaderText="District" SortExpression="CFACSSUP">
                    <ItemStyle Font-Size="Small" />
                    <HeaderStyle Font-Size="Small" HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:HyperLinkField DataNavigateUrlFields="LCONTID" DataNavigateUrlFormatString="detail.aspx?lcontid={ 0}"
                    Text="Details..." HeaderText="Details" >
                    <ItemStyle Font-Size="Small" HorizontalAlign="Left" />
                    <HeaderStyle Font-Size="Small" HorizontalAlign="Left" />
                </asp:HyperLinkField>
            </Columns>
            <RowStyle BackColor="White" ForeColor="#330099" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
            <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT DISTINCT Min(J.ROUTE),L.LETTING, L.CALL,L.LCONTID,Q.CPROJNUM,Q.CFACSSUP,Q.CCNTY1 FROM VENDOR V, VENDADDR R, LETPROP L, PLANHOLD P,PROPOSAL Q, PROJECT J,PROPPROJ K WHERE V.VENDOR = R.VENDOR AND K.CONTID = Q.CONTID AND K.PCN = J.PCN AND L.LCONTID = K.CONTID AND P.VENDOR = V. VENDOR AND L.LETTING = P.LETTING AND P.LETTING = '06042801' AND L.CALL = P.CALL AND R.ADDRNUM = P.BILLTO group by V.VENDOR,R.ADDRNUM, V.VNAMEL, R.AADDR1,P.BILLTO,R.ACITY, R.ASTATE, R.AZIPCODE,R.VASST1,R.APHONE,L.LETTING, L.CALL,L.LCONTID,Q.CPROJNUM,Q.CFACSSUP,Q.CCNTY1">
        </asp:SqlDataSource>

    </div>
    </form>
</body>
</html>

****************************
detail page:
*******************************
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="detail.aspx.vb" Inherits="detail" %>

<!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>
        <span style="font-weight: bold; color: #333366; font-style: italic; font-variant: normal">
            Page 2..........<br />
            Vendor List For Current Letting:<br />
            Please work for me I am running out of patient if you do now work soon i might abandon
            you please work for me......<br />
        </span>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="LCONTID" DataSourceID="SqlDataSource2" CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%">
            <Columns>
                <asp:BoundField DataField="LCONTID" HeaderText="Contract Id" SortExpression="LCONTID" />
                <asp:BoundField DataField="LETTING" HeaderText="Letting Date" SortExpression="LETTING" />
                <asp:BoundField DataField="RT" HeaderText="Route Number" SortExpression="RT" />
                <asp:BoundField DataField="VENDOR" HeaderText="Vendor" SortExpression="VENDOR" />
                <asp:BoundField DataField="ADDRNUM" HeaderText="Address" SortExpression="ADDRNUM" />
                <asp:BoundField DataField="VNAMEL" HeaderText="Vendor Name" SortExpression="VNAMEL" />
                <asp:BoundField DataField="AADDR1" HeaderText="Address 2" SortExpression="AADDR1" />
            </Columns>
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <EditRowStyle BackColor="#999999" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand='SELECT DISTINCT "LCONTID", "LETTING", "RT", "VENDOR", "ADDRNUM", "VNAMEL", "AADDR1", "BILLTO" FROM "DETAILPHLFORBIDLET" WHERE ("LCONTID" = :LCONTID)'>
            <SelectParameters>
                <asp:QueryStringParameter Name="LCONTID" QueryStringField="LCONTID" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>

    </div>
    </form>
</body>
</html>


Reply With Quote
  #2 (permalink)  
Old April 5th, 2006, 04:06 PM
MDM MDM is offline
Authorized User
 
Join Date: Mar 2006
Location: , , .
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Not an expert by any chance,

but I do these things using details view form on the master - insert a hyperlink , specify the parameter i.e. requestid,eventid,whateva and specify the hyperlink in he following manner http//www.nextpage.aspx?userid(specify here the parameter)={0}. NO SPACES.

On the details page you can have a grid and catch the data based on the q.string parameter.

hope it helps

MDM

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
master-detail hhpatek ADO.NET 0 April 3rd, 2008 02:53 PM
Master Detail prasanta2expert Access VBA 1 October 1st, 2007 06:37 AM
Need Help Master Detail page ollie281 Dreamweaver (all versions) 0 August 7th, 2006 12:35 PM
master/detail page yteferi ASP.NET 2.0 Basics 6 April 12th, 2006 09:04 AM



All times are GMT -4. The time now is 02:52 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.