By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,993 Members | 1,898 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,993 IT Pros & Developers. It's quick & easy.

How do I get from dynamic aspx to static html

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.