Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Server-side, then client.

Reply
Thread Tools

Server-side, then client.

 
 
gsauns
Guest
Posts: n/a
 
      04-29-2007
Is it possible to, on a click of a button, run server-side code, and
then, upon page refresh, run a client-side Javascript function?
The client-side code would run only when the page was refreshed by
that particular button.

 
Reply With Quote
 
 
 
 
Mark Rae
Guest
Posts: n/a
 
      04-29-2007
"gsauns" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Is it possible to, on a click of a button, run server-side code, and
> then, upon page refresh, run a client-side Javascript function?
> The client-side code would run only when the page was refreshed by
> that particular button.
>



protected void MyButton_Click(object sender, EventArgs e)
{
if (<...evaulate some condition...)
{
ClientScript.RegisterStartupScript(GetType(), "clientside",
"alert('Hello);", true);
}
}

--
http://www.markrae.net

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      04-29-2007
This article may help you:

How to Pass Messages and Actions between Server and Client
http://usableasp.net/DeveloperPage.a...rAndClient.htm
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


"gsauns" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Is it possible to, on a click of a button, run server-side code, and
> then, upon page refresh, run a client-side Javascript function?
> The client-side code would run only when the page was refreshed by
> that particular button.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Slow, then quick then slow JosephByrns ASP .Net 4 11-13-2007 01:34 AM
Help. SessionID is x then y then x then y BodiKlamph@gmail.com ASP General 0 09-03-2005 03:02 PM
Read all of this to understand how it works. then check around on otherRead all of this to understand how it works. then check around on other thelisa martin Computer Support 2 08-18-2005 06:40 AM
greater then / less then =?Utf-8?B?TWlrZQ==?= ASP .Net 2 11-04-2004 06:05 PM
Help: anyway to burn movie to DVD RW (then view it) and then eraseafterward? qwerty DVD Video 6 01-07-2004 04:54 AM



Advertisments