Share via


Creating a query page

A query page is an ASP, ASPX, or HTML file. Once you have created your ASP, ASPX, or HTML file, you’ll need to create a URL page in Business Portal. The URL page will point to your ASP, ASPX, or HTML file.

Before you create a query page, be sure that you have created a root folder and a configuration file for the query page. For more information, see Creating a root folder and Creating a configuration file.

The following example shows the HTML code for the Lead Queries page included in the sample application.

<html>
 <head>
  <title>Lead Queries</title>
  <link rel="stylesheet" type="text/css" href="/BusinessPortal/Applications/QueryPages/Stylesheets/QueryPage.css">
  <style>
   #QueryPage
   {
      overflow:hidden;
      margin:0;
      padding:0;
      height:100%;
      width:100%;
   }
   #DataCenterFrame
   {
      height:expression(TitleArea.parentElement.offsetHeight - TitleArea.offsetHeight);
         width:100%;
   }
  </style>
 </head>
  <body id="QueryPage" onresize="window.document.frames(0).document.recalc(true);">
    <script language="jscript" src="/BusinessPortal/Portal/Shell/scripts/IEShellInfo.js"></script>

 <table border="0" id="TitleArea" cellpadding="0" cellspacing="0" width="100%">
   <tr>
    <td>
     <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr>
       <td valign="middle" style="padding-top:2px">
       </td>
      </tr>
     </table>
    </td>
   </tr>
  </table>
  <iframe id="DataCenterFrame" src="/BusinessPortal/Portal/DataCenter/DataCenter.aspx?DataCenterConfigXML=/BusinessPortal/Applications/BPSDK/QueryPages/Lead.xml">
  </iframe>
 </body>
</html>

The LINK element is used to link to an external file such as a stylesheet. This element has several attributes. The rel and type attributes specify the type of file that is being linked to. The href attribute specifies the location of the file.

<link rel="stylesheet" type="text/css" href="/BusinessPortal/Applications/QueryPages/Stylesheets/QueryPage.css">


QueryPage.css is the stylesheet created for query pages that are displayed in the Business Portal. We recommend that you use this stylesheet when displaying a query page in the Business Portal.

The IFRAME __ element is used to define a floating frame. A floating frame allows you to embed a document into an HTML document so that the embedded data can be displayed anywhere on the web page. The src attribute is used to specify a URL. This URL contains two parts separated by a question mark (?). The first part specifies the location of the ASPX file implementing the query page. The ASPX file used to implement a query page for the Business Portal is DataCenter.aspx. The second part specifies the location of the configuration file for the query page.

<iframe id="DataCenterFrame" src="/BusinessPortal/Portal/DataCenter/DataCenter.aspx?DataCenterConfigXML=/BusinessPortal/Applications/BPSDK/QueryPages/Lead.xml">
  </iframe>