News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

Advertisement

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;
<asp:SqlDataSource id="sqlds" runat="server" ConnectionString="<%$ ConnectionStrings:MyDB %>" SelectCommand="SELECT * FROM Companies" />

The page is accessed frequently, but the data in the database rarely changes. You need to cache the retrieved data so that the database is not queried each time the Web page is accessed. What should you do?

  1. Add the following attributes to the SqlDataSource control.

    DataSourceMode="DataSet"
    EnableCaching="True"
    CacheDuration="120"
    
  2. Add the following attributes to the SqlDataSource control.

    DataSourceMode="DataReader"
    EnableCaching="True"
    CacheDuration="120"
    
  3. Add the following configuration to the <system.web/> section of the web.config file.

    <caching>
    <sqlCacheDependency enabled="true">
    <databases>
    <add name="MyDBCache"
    connectionStringName="MyDB"
    pollTime="120" />
    </databases>
    </sqlCacheDependency>
    </caching>
  4. Add the following configuration to the <system.web/> section of the web.config file.

    <caching>
    <sqlCacheDependency enabled="true" pollTime="120">
    <databases>
    <add name="MyDBCache"
    connectionStringName="MyDB" />
    </databases>
    </sqlCacheDependency>
    </caching>
Answer: Answer is a
comments powered by Disqus
Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;