473,396 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How do I get from dynamic aspx to static html

I created this neat little .net site which tracks the inventory of my
little widge company giving me real time inventory counts and whatnot.
It uses your standard code that calls a stored procedure and loads up a
datagrid and works really well.

It occurred to me that since my database inventory is only updated once
per day at 6:30 am having this dynamic query and page generation is
overkill and I really just need to save the output to some static html
page. (or static aspx page with the data hard coded in).

This would save alot of processing and probably make the site very
quick to respond to the thousand upon thousand requests for this
information from my users.

So my question is how do I get from the aspx page with the datagrid to
the html page thats just a table with hard coded data?

I'm guessing there's no function called "save as html" from a web form
that would do this for me and I am stuck writing this out manually?

Once I have the output html stored in some file (like inv011706.html)
is there a way I can import this from my default.aspx file based upon
the current date?

Thanks

Jan 18 '06 #1
5 2048
What you can do is to create a table inside your database that would hold the
time of the last update and the results of your query in a string format
(something like output from Dataset.WriteXml()) and then have your page check
the timestamp in this table. If the last update time was prior to 6:30 am and
now it is after - populate your dataset with the values from your query and
save the xmlstring into this new table, otherwise - populate your dataset
with ReadXml() method.

HTH

"Rich S" wrote:
I created this neat little .net site which tracks the inventory of my
little widge company giving me real time inventory counts and whatnot.
It uses your standard code that calls a stored procedure and loads up a
datagrid and works really well.

It occurred to me that since my database inventory is only updated once
per day at 6:30 am having this dynamic query and page generation is
overkill and I really just need to save the output to some static html
page. (or static aspx page with the data hard coded in).

This would save alot of processing and probably make the site very
quick to respond to the thousand upon thousand requests for this
information from my users.

So my question is how do I get from the aspx page with the datagrid to
the html page thats just a table with hard coded data?

I'm guessing there's no function called "save as html" from a web form
that would do this for me and I am stuck writing this out manually?

Once I have the output html stored in some file (like inv011706.html)
is there a way I can import this from my default.aspx file based upon
the current date?

Thanks

Jan 19 '06 #2
I understand what you are saying thanks.

I might build the data and write it out to an xml file and import that
upon demand.

I'm guessing that performance wise a html file would load the quckest
and performing the query and building the grid would be the slowest, so
this method would be leaning towards the faster side of that range.

Plus it gives me the benefit of using the grid for paging which I would
have a tough time doing in html pages.

Thanks, I'll give it a try.

Jan 19 '06 #3
Rich,
why not just Cache the returned DataSet with an absolute expiration of "XX"
hours?
Your code would look to see if your DataSet is still in Cache and if not, it
would get a new one and stick it there.
That's what Cache is for.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Rich S" wrote:
I created this neat little .net site which tracks the inventory of my
little widge company giving me real time inventory counts and whatnot.
It uses your standard code that calls a stored procedure and loads up a
datagrid and works really well.

It occurred to me that since my database inventory is only updated once
per day at 6:30 am having this dynamic query and page generation is
overkill and I really just need to save the output to some static html
page. (or static aspx page with the data hard coded in).

This would save alot of processing and probably make the site very
quick to respond to the thousand upon thousand requests for this
information from my users.

So my question is how do I get from the aspx page with the datagrid to
the html page thats just a table with hard coded data?

I'm guessing there's no function called "save as html" from a web form
that would do this for me and I am stuck writing this out manually?

Once I have the output html stored in some file (like inv011706.html)
is there a way I can import this from my default.aspx file based upon
the current date?

Thanks

Jan 19 '06 #4
oh even better. I didn't realize you could do that. That works for all
users ? Well I'll read up and find out.

Thanks

Peter Bromberg [C# MVP] wrote:
Rich,
why not just Cache the returned DataSet with an absolute expiration of "XX"
hours?
Your code would look to see if your DataSet is still in Cache and if not, it
would get a new one and stick it there.
That's what Cache is for.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Rich S" wrote:
I created this neat little .net site which tracks the inventory of my
little widge company giving me real time inventory counts and whatnot.
It uses your standard code that calls a stored procedure and loads up a
datagrid and works really well.

It occurred to me that since my database inventory is only updated once
per day at 6:30 am having this dynamic query and page generation is
overkill and I really just need to save the output to some static html
page. (or static aspx page with the data hard coded in).

This would save alot of processing and probably make the site very
quick to respond to the thousand upon thousand requests for this
information from my users.

So my question is how do I get from the aspx page with the datagrid to
the html page thats just a table with hard coded data?

I'm guessing there's no function called "save as html" from a web form
that would do this for me and I am stuck writing this out manually?

Once I have the output html stored in some file (like inv011706.html)
is there a way I can import this from my default.aspx file based upon
the current date?

Thanks


Jan 19 '06 #5
Peter,

Definitely, Cache is a better option in a single server environment, but
what about a Web Farm - from what I understood the initial data retrieval is
relatively costly..

I am not suggesting that Cacheing is a no-no (I am quilty of caching
myself), but its use has to be evaluated.
"Peter Bromberg [C# MVP]" wrote:
Rich,
why not just Cache the returned DataSet with an absolute expiration of "XX"
hours?
Your code would look to see if your DataSet is still in Cache and if not, it
would get a new one and stick it there.
That's what Cache is for.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Rich S" wrote:
I created this neat little .net site which tracks the inventory of my
little widge company giving me real time inventory counts and whatnot.
It uses your standard code that calls a stored procedure and loads up a
datagrid and works really well.

It occurred to me that since my database inventory is only updated once
per day at 6:30 am having this dynamic query and page generation is
overkill and I really just need to save the output to some static html
page. (or static aspx page with the data hard coded in).

This would save alot of processing and probably make the site very
quick to respond to the thousand upon thousand requests for this
information from my users.

So my question is how do I get from the aspx page with the datagrid to
the html page thats just a table with hard coded data?

I'm guessing there's no function called "save as html" from a web form
that would do this for me and I am stuck writing this out manually?

Once I have the output html stored in some file (like inv011706.html)
is there a way I can import this from my default.aspx file based upon
the current date?

Thanks

Jan 19 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

467
by: mike420 | last post by:
THE GOOD: 1. pickle 2. simplicity and uniformity 3. big library (bigger would be even better) THE BAD:
10
by: moondaddy | last post by:
I'm writing an ecommerce app in asp.net/vb.net and need to make the pages searchable and crawlable by spiders, particularly Google's. As far as I know, if my pages's contents are mostly populated...
2
by: Joe | last post by:
Hi, I have a website with a mix of static (.html) and dynamic pages (.aspx) pages. I was wondering to change extension .html to .aspx , only to accommodate future needs of making static pages...
3
by: michael_vanommeren | last post by:
I have two web applications that I am working with and I am trying to do a Response.Redirect from one to the other. They are setup as separate web applications on the same IIS server. If I go...
2
by: John Olsen | last post by:
Hi. I`m building a small CMS, and want to add the possibility to include server side code inside static html-strings that is stored in a database. For e.g. in the string...
5
by: pittendrigh | last post by:
There must be millions of dynamically generated html pages out there now, built by on-the-fly php code (and jsp, perl cgi, asp, etc). Programatic page generation is transparently useful. But...
7
by: Jo | last post by:
Hi, How can i differentiate between static and dynamic allocated objects? For example: void SomeFunction1() { CObject *objectp = new CObject; CObject object;
2
by: steven | last post by:
I have heard static html is a good way to do the default.html as it is faster and save resource hits over aspx for example. But what if you want to generate and overwrite the static html pages...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.