Forum
 
 
Knowledge Base Forum
To post messages on the forum, you need to login first.
SearchForum Home
  Product Forums  smartDBforms.NET  Using smartDbFo...
 Using smartDbForms with Master Pages
 
 5/31/2010 3:55:09 AM
David
10 posts


Using smartDbForms with Master Pages

I am currently using Visual Web Studio 2008 and have a master page that i want to use with these forms.

When I try to create a new form the "Place code in separate file and "Select master page" is grayed out.

How can I use the forms in a master page ??

 

 

 5/31/2010 6:08:29 PM
Adillis Support
43 posts
adillis.com


Re: Using smartDbForms with Master Pages

Hi David,

The Visual Studio templates for web form with master page allow only empty initial content. This is technical limitation. It is not possible to automatically insert the required smartDBforms.NET initial controls when the wizard is creating a Web Form with master page.

You can easily create a smartDBforms.NET web form which uses master page in the following way:
  1. Create a new standard Web Form. Select the "select master page" checkbox and select the desired master page.
  2. Open the new web form in Source view.
  3. At the top of the page paste the following code. This is required to register smartDBforms.NET controls:
    <%@ Register Assembly="Adillis.SmartDBForms" Namespace="Adillis.SmartDBForms.DataSource" TagPrefix="smartDataSource" %>
    <%@ Register Assembly="Adillis.SmartDBForms" Namespace="Adillis.SmartDBForms" TagPrefix="smartDBforms" %>
  4. Inside the desired Content control paste the following code. These are the data source, message area, SmartDBView and pager:
    <smartDataSource:SmartDataSource ID="SmartDataSource1" runat="server"
         ConnectionString="<%$ ConnectionStrings:LocalSqlexpressNorthwind %>" ProviderName="<%$ ConnectionStrings:LocalSqlexpressNorthwind.ProviderName %>">
    </smartDataSource:SmartDataSource>
            <smartDBforms:OperationStatus ID="OperationStatus1" runat="server" ControlIDToHandle="SmartDBView1" Font-Size="Smaller" Width="485px"></smartDBforms:OperationStatus>   
    <smartDBforms:SmartDBView ID="SmartDBView1" runat="server" DataSourceID="SmartDataSource1" Width="485px">
    </smartDBforms:SmartDBView>
            <smartDBforms:SmartPager ID="SmartPager1" runat="server" ControlIDToPage="SmartDBView1"></smartDBforms:SmartPager>


You can also get these code snippets from the the initial "smartDBforms.NET Web Form".

If you have any other questions, we will be more than happy to help you.
Best wishes,
Adillis Support
Adillis - IT solutions
http://adillis.com
  Product Forums  smartDBforms.NET  Using smartDbFo...
Copyright 2006-2010 Adillis Terms Of Use Feedback Contact Us