Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Dynamic & Static page execution

$
0
0
Re: Dynamic & Static page execution
Web Connection 5.0
Re: Dynamic & Static page execution
Dec. 7, 2012
03:38 am
3NU07S9SNShow this entire thread in new window
Gratar Image based on email address
From:Ian G. Lloyd
To:Rick Strahl
Rick... I think this belongs to another thread...


You just add list items to the list like this:

<ww:wwWebDropDownListID="lstList"runat='server'> <asp:ListItemvalue="1">Item1</asp:ListItem><asp:ListItemValue="2">item2</asp:ListItem><asp:ListItemValue="3" Selected="True">Item3</asp:ListItem></ww:wwWebDropDownList>

You can find more info here:

wcdocs:_3ha0s50bv.htm

If the list is static and you don't need to capture the value on a Postback you can also use plain HTML for the list:

<selectid="lstList"name="lstList"><livalue="1">Item 1</li><livalue="2" selected="selected">Item 2</li></select>

Hope this helps,

+++ Rick ---

I don't think so... at least not if you keep the file names the same. The problem is that once you have an extension script mapped it'll always go to the script executable. Unless you re-route the script executable (which is easy to do with a web.config setting). For example, in IIS 7 you could set the handler to the StaticFileHandler.

You can basically map to the static file handler like this:

<system.webServer><validation validateIntegratedModeConfiguration="false" /><handlers><addname="wwd-handler" path="*.wwd" verb="*" modules="StaticFileModule" resourceType="Either" /><!-- <add name="wwd_wconnect" path="*.wwd" verb="*" type="Westwind.WebConnection.WebConnectionHandler,WebConnectionModule" preCondition="integratedMode" /> --></system.webServer>

Comment out the real scriptmap and the point at the static handler. When you're done you comment out the static handler and re-enable the original. You can potentially do this from code since web.config is just an XML file.

One more thing though - if you use a script map that's not standard (like wwd) you'll need to add a mime map so that the static file handler will serve it:

http://technet.microsoft.com/en-us/library/cc725608(v=ws.10).aspx

Of course all this means that the file needs to exist. it would be fairly straight forward to capture response output and write it to file, but figuring out WHEN to write it out might be a bit more problematic...

+++ Rick ---


Hi All... is there a way to configure a website to execute a static page with the same name & extension as a dynamic WC page... what I mean is, if the engine is shutdown for maintenance I want to create a static page with the same name which would execute (ie: psMain.p2so)... when the site is running this page would not exist statically, when it is NOT running the Static page would exist... any thoughts or help with this appreciated... thanx...






Viewing all articles
Browse latest Browse all 10393

Trending Articles