If you want that, the page will be submitted to the server, calculated, returned and redrawn by the browser each time. This will be rather slow.
Also, the cursor will not be placed in the correct cell.
However, for small web pages it might work. If you use ASP.NET, setting the autopostback-property will do this for you.
http://msdn.microsoft.com/workshop/webcontrols/webforms/libr ary/shared/AutoPostBack.asp
There is one complication: You need to add two lines.
Add
Request("xl_postback") != "1" ||
to the server side code on top so that the values are read from the form whenever the submit was done by selecting a new value in the listbox. and do a submit in onchange on the <select.
onchange="document.formc.xl_postback.value='99'; document.formc.submit();"
As you see, we need to set a flag so that the server-side code that this is a recalc request and not a reset request. I used the existing hidden variable xl_postback, since this isn’t used in the ASP.NET version. I changed the value from 1 to something else (99).
The object is a JSObject.
If you use C#, the “JSObject” indexer can be used to get and set object properties:
Object x = getObject(); Object prop1 = ((JSObject)x)["prop1"]; ((JSObject)x)["prop2"] = 42;
You need to include the following namespaces:
using Microsoft.JScript;
Compile your application against the following assemblies:
Microsoft.JScript
We will change the code to generate a standard class some time in the future, these JSObjects are not that nice. This is already done in the JSP/Java-version.
Most people who use the ASP.NET-version accesses the data from the ASPX-page directly, instead of accessing the object.
If you installed IIS after the DOTNET-framework, you get that behaviour.
The framework can’t configure IIS before it is installed.
Solution: Execute the aspnet_regiis.exe in the Framework directory
The HTML-version calculates on the user’s PC, the ASP and JSP version calculates on the server.
Thus, the user get the results instantly in the HTML-version.
If you do not want to purchase VS, there are free alternatives.
Microsoft® Visual Web Developer® 2010 Express provides you with everything you need to start building standards-friendly Web applications
http://www.microsoft.com/express/Web/
You want to store the values from your ASP.NET form into a database and repopopulate the form when the user returns back.
I get “Common Language Runtime detected an invalid program.” when generating an ASP.NET page
You have run into a limit in Microsoft runtime engine CLR.
There are two workarounds:
1. Reduce the size of the original spreadsheet.
2. Use Classic ASP instead, which doesn’t have these restrictions.
Yes.
However, Visual Studio 2003 removes some styles part and renames the form from formc to formc[0].
You have to put the styles back, and make sure that the form is correctly referenced.
Yes.
Change the extension from .htm to .aspx. Then, you should be able to use ASP.NET authentification system.
If you use ASP.NET, there are two simple solutions:
1. Loop over the ASP.NET-controls , see
/tutorials/programmers/aspnet/Default.htm
2. Generate a pure HTML-form (Select this in SSC to ASP.NET) and set the action=”..” to point at your ASP-code which loops over the request-parameters. You loop over the collection called Request.Form.
Here are a number of good tutorials:
Click on Download to install and test this Excel add-in for Windows.
Click on Upload to let us convert a spreadsheet for you for free.