"Delayed" server-side vb running after client-side javascript

Joined
Feb 7, 2003
Messages
10
And yes, it needs to be explained...

I load a page that has server-side vbscript and client-side javascript.
I use javascript on runat=server buttons and at SOME point (after everything has finished) I want to create a connection to a database FROM THE SERVER (cant have all the clients connecting straight into it) and input the data there.

It seriously sounds like calling server-side code from client-side, and I *know* thats silly... but Im trying to figure a way around it.

Having both client- and server- side code on a button will not work, since the server will run it at once, while the client waits for input...

Can I somehow "delay" server-side code?
waiting for an event to happen/trigger it?

Ive also thought of opening another window-passing the data to it- and server-side running the connection to DB, then closing it immediately...
but thats not exactly a dream situation...

anyone? :(


Note: ALL client-side scripting has to be javascript as a requirement (although if theres a solution in vbscript, Id be more than happy to hear it).
 
Youre using vbScript on the server-side? (or did you mean VB.NET?)

Im not sure I understand your question. You can use IsPostBack in the form load event to check if its a post back or not. NOt sure if thats what youre looking for.
 
I can use whatever I wish on the server-side.

Is it possible to pass the desired data (that can be a lot) to another ASP.NET page without using a url parameter scheme...?
(You know, redirecting to another page, using a bogus url...)
 
What type of data is it, and where is it coming from? (Page values or files from the client, etc..)
 
Page values, typed in...
apart from one last value that is a generated value and can be up to 2-3k.

Hence, I dont want that to go in a url
 
You can use HttpServerUtility.Transfer, it is dicussed in VS.NET help section, look up "Passing Server Control Values Between Pages".

They cover In-line as well as Code-behind.
 
Back
Top