Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 18th, 2004, 08:16 AM
Registered User
 
Join Date: Aug 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to PostmanPat
Default run asp script from aspx

HI,

I have a simple file, named refreshpromos.asp, (which makes a certain global variable emty).
(<%Application("PROMO_XML") = Empty%>)

i want this script to run from a aspx.file when i push a "publish button".
how do i do that ?

my code
"....
case "publish" :

?????
_____

?????
break;
 
Old August 18th, 2004, 06:15 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

No, you can't. And you really shouldn't. Are you planning on sharing this global variable between an ASP application and an ASP.NET application? They operate in different processes and don't share information. I think you might be best to simply issue a response redirect from the button click handler that sends you to an separate .asp page, then have that page do what you need, then redirect you back (if necessary).
 
Old August 31st, 2004, 04:48 PM
Authorized User
 
Join Date: Jul 2004
Posts: 69
Thanks: 0
Thanked 1 Time in 1 Post
Default

ASP.NET and ASP don't share Session or Application variables, nor can they read scripted variables from each other. Should there be no other way, you would probably want to update the ASP code to ASP.NET anyway.

www.CoderForRent.com
Get A Computer Job!
 
Old September 14th, 2004, 12:58 PM
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can use HttpWebResponse in your code behind to call refreshpromos.asp. NOTE: This file will be resolved before the aspx.






Similar Threads
Thread Thread Starter Forum Replies Last Post
.aspx.vb file doesnt run arabuafef ASP.NET 2.0 Professional 7 March 18th, 2008 12:20 PM
cant run my script! angelic_scars Beginning PHP 1 November 9th, 2006 12:17 AM
Client Side script for executing an aspx page Sujith Manuel VBScript 1 November 9th, 2004 06:48 AM
Script causes IE to run slowly TSEROOGY Javascript 1 October 7th, 2004 05:39 PM
Call and run CGI script from a PHP script ... how? dbruins BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 June 10th, 2003 03:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.