473,757 Members | 2,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2059
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.WriteXm l()) 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
21621
by: mike420 | last post by:
THE GOOD: 1. pickle 2. simplicity and uniformity 3. big library (bigger would be even better) THE BAD:
10
3227
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 by user controls on a single page and I call these different controls by passing one or more parameters like this: myweb.com/default.aspx?MenuID=44, then the spiders aren't going to be able do to anything with this. asp.net offers lots of great...
2
1522
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 interactive. I read an article http://authors.aspalliance.com/aspxtreme/aspnet/webforms/authoringaspnetpage.aspx which says that by changing .html etension to .aspx the server will not overburdened. I use to believe otherwise. Can you tell me what...
3
3482
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 directly to the second application in a browser, all of my events fire correctly. However, if I have the first application do a Response.Redirect to the second, for some reason none of my events on the second application ever get fired. After I...
2
3693
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 "<div><b>News></b><br></div>", should be replaced by the rendered html-outpu from a usercontrol that prints out database content. I use regex to get the content of the -tags, and load the control and get the output-html with the following code:
5
3177
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 querying a database, negotiatinig lots of if-then-else logic and echo'ing html code out on port 80 every time a page is requested has to be a huge waste of resources. Why not use that logic to print static html instead of dynamic?
7
8223
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
2461
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 every day. If you had a busy site like amazon the html pages would always be open and busy by users hitting the web site every second. So how could the update write of the page work. Plus, what if you wanted ads on your page and you were using...
15
5276
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 show - text boxes, input boxes, buttons, hyperlinks ie the usual. The data is not obtained directly from a database.
0
9487
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9297
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10069
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9904
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9884
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3828
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2697
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.