Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4111278
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:02:44+00:00 2026-05-20T22:02:44+00:00

First off I’m not sure that’s the proper title for this question but hopefully

  • 0

First off I’m not sure that’s the proper title for this question but hopefully I’ll do a better job trying to explain what I need to accomplish.

Introduction

What I want to do is load the FAQ information that is relative to the page I’m on. So say I’m on the page http://www.domain.com/items/index, I want to load the FAQ information that describe what can be done on this page and what options are available… etc. Then, the user rolls over a search bar, I want to display (on the side of a page) a short text that describes the search box and how it works (like telling them you could search by keywords or for a specific item or… etc). And it goes like that for the rest of the pages and stuff on those pages.

Brainstorming

Ok so what I have in mind so far, and which I’m not sure of (hence this is why I’m posting the question) is as follows:

  1. In the database, create two tables: PageFAQ and ElementFAQ where an ElementFAQ is a child of PageFAQ. The reason why I thought about this is so I would load the PageFAQ and all ElementFAQ all together and dump them into the page and hide them.
  2. At this point, I would only display the summary text of the PageFAQ which tells the user more about the page and some of the available options.
  3. Now, in order to load the correct ElementFAQ, some steps should be taken on the server and client side:
    • Make sure the Id’s/Names of the ElementFAQ’s in the database match those of the hidden divs that were dumped into the page previously (when the PageFAQ relative to the page was loaded)
    • When the user rolls over an element (say the search bar), I would use jQuery to search for a div with id faq_searchBar and display its innerHTML inside the FAQ side box.

Problem

All what is mentioned above should theoretically work. But I can’t get my mind around how to map between the “page” I’m currently viewing and the PageFAQ entry in the database. As you know, there aren’t really pages in ASP.NET MVC, there are only routes. So is there some way I could use route data to fetch the needed PageFAQ? Or should I use the query string? Or is there a better way of doing this all together, preferably something that does not use magic strings in the first place.

UPDATE:

Would it be too much overhead loading the PageFAQ and all its ElementFAQ children and dump them into the page as hidden divs? Or would it be a better idea to load them via AJAX when the user rolls over the element?

Your suggestions are most welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:02:45+00:00Added an answer on May 20, 2026 at 10:02 pm

    “page” I’m currently viewing

    string currentAction = RouteData.GetRequiredString("action");
    string currentController = RouteData.GetRequiredString("controller");
    string id = CalculateId(currentAction, currentController);
    PageFAQ pageFAQ = Repository.GetFAQ(id);
    ...
    

    The CalculateId could simply associate the current controller and action to the corresponding id in the database or directly add those columns in your database and then query:

    string currentAction = RouteData.GetRequiredString("action");
    string currentController = RouteData.GetRequiredString("controller");
    PageFAQ pageFAQ = Repository.GetFAQ(currentAction, currentController);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First off, I'm sure this is a simple question. I'm just getting started with
First off, an apology as I am sure this is question's answer is quite
first off this is a class assignment so i would appreciate help but just
First off I apologize if there is another post out there that answers this,
First off, please accept my apologies if this question is basic, I mainly have
First off, this is part of an extra credit homework, so please do not
First off, I need to give a disclaimer: DO NOT RUN THIS JAVASCRIPT It
First off, the little voice inside my head is screaming that this is a
First off, I'm trying to send keyboard input to a background application(A window that
First off, I am not trying to write to the SDCard. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.