How to Link the data to Dashboard box

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
wangyonggang
User
Posts: 11

How to Link the data to Dashboard box

Post by wangyonggang »

How Can I Link or Set the DATA that from database SQL into box?
For example, I want to replace the below '150' number by a result of SQL view/query in SQL server DB.
More or less, looks like VB code function 'DLOOKUP('[filed]','viewoftable','WHERE condition')'.

<div class="small-box bg-info">
  <div class="inner">
    <h3>150</h3>
    <p>New Orders</p>
  </div>
  <div class="icon">
    <i class="fas fa-shopping-cart"></i>
  </div>
  <a href="#" class="small-box-footer">
    More info <i class="fas fa-arrow-circle-right"></i>
  </a>
</div>

MichaelG
User
Posts: 1139

Post by MichaelG »

Use the ExecuteScalar function to get value from SQL.


wangyonggang
User
Posts: 11

Post by wangyonggang »

Thanks for your reply.
Could you show me a DEMO or Sample codes?
Thanks a lot.


MichaelG
User
Posts: 1139

Post by MichaelG »

It is simply

ExecuteScalar("SELECT Field FROM Table WHERE ...")

wangyonggang
User
Posts: 11

Post by wangyonggang »

IT WORKS.Thank You Very Much!

@ExecuteScalar("SQL")


Post Reply