locked
Viewing Database using Template RRS feed

  • Question

  • User789366951 posted

    Hi,

    I am running a Access Database and I have a Intranet site, Administrators can post News to a table in the Access database and Intranet users can see the news when they go to the Intranet site.

    Any important/companie news is posted to the Front page and the user can access the news vie a link.

    BUT;

    if there are more than one post when the user clicks on the link they can only read  the first post.

    When they click on the 2nd link the first post opens but the Activity ID from my table in access changes!

     

     

     

    The Activity Id changes but the page content does not, I am using form view on the Activitydetails2.aspx to view the news table Intranet site

     

    Saturday, January 22, 2011 6:15 AM

Answers

  • User3866881 posted

    You should use a Gridview a repeater to show the general list of news on the first page with a hyperlink something like

    <a href='XXX.aspx?id=<%#Eval("Id")%>'>News</a>

    And then in the XXX.aspx page, please put a DetailsView with a AccessDataSource, but the select should be something like

    select * from xxx where id=@id

    and your <SelectParameter> should use a QueryStringParameter something like:

    <asp:QueryStringParameter Name="id" type="Int32" QueryStringField="id"……/>

    For more please see this similar issue at:

    http://www.exforsys.com/tutorials/asp.net-2.0/displaying-master-detail-data-on-separate-pages-in-asp.net-2.0.html

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, January 22, 2011 9:29 PM

All replies

  • User-693248168 posted

    Can you show us the Page_Load method of your second page where you see the news details?

    Saturday, January 22, 2011 9:29 AM
  • User3866881 posted

    You should use a Gridview a repeater to show the general list of news on the first page with a hyperlink something like

    <a href='XXX.aspx?id=<%#Eval("Id")%>'>News</a>

    And then in the XXX.aspx page, please put a DetailsView with a AccessDataSource, but the select should be something like

    select * from xxx where id=@id

    and your <SelectParameter> should use a QueryStringParameter something like:

    <asp:QueryStringParameter Name="id" type="Int32" QueryStringField="id"……/>

    For more please see this similar issue at:

    http://www.exforsys.com/tutorials/asp.net-2.0/displaying-master-detail-data-on-separate-pages-in-asp.net-2.0.html

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, January 22, 2011 9:29 PM
  • User789366951 posted

    Hi Checked out the link and that was what i was looking for, Quite easy once you know where to start, Cheers. 

    Wednesday, January 26, 2011 3:41 PM